Skip to content

Fix login and playback for the current DPG API - #64

Open
snauwaertc wants to merge 2 commits into
add-ons:masterfrom
snauwaertc:fix/dpg-api-2026
Open

snauwaertc wants to merge 2 commits into
add-ons:masterfrom
snauwaertc:fix/dpg-api-2026

Conversation

@snauwaertc

Copy link
Copy Markdown

The add-on stopped working: logging in fails with 426 Client Error: Upgrade Required on https://lfvp-api.dpgmedia.net/STREAMZ/tokens. Fixes #61. DPG Media changed the API in the same way as for VTM GO (see add-ons/plugin.video.vtm.go#405 and #407). This PR ports the equivalent changes to Streamz.

Changes

Authentication

  • Headers now identify as app version 28 (Android TV); version 15 is refused with 426.
  • The /STREAMZ/tokens exchange is gone. After the device-code login, the id token is registered with POST /STREAMZ/id-token and used as Authorization: Bearer. The OAuth access token from login.streamz.be is encrypted (not a JWT) and is refused by the API gateway; the signed id token is accepted.
  • Tokens are refreshed with the refresh_token grant on login.streamz.be (scope openid offline_access).
  • Profiles: mainProfile/kidsProfile were replaced by type (MAIN/KIDS).

Catalog

  • Storefront movies is now films.
  • Teasers only carry a detailId, without the content type. They are shown as a new Teaser item that opens /catalog/detail/<id>; the detail page (detail3, which replaces detail) tells whether it is a movie or a program. Cached details are shown as a Movie/Program directly.
  • Programs read their seasons from seasonPicker.
  • Movies are played with primaryButton.playableId, which differs from the detail id.
  • "Continue watching" teasers carry a playableId and are shown as playable episodes. The row id is looked up from the main storefront instead of a hardcoded id.
  • SWIMLANE_TOP10 and CONTINUE_WATCHING rows are listed as categories.

Playback

  • Video info comes from https://videoplayer-service.dpgmedia.net/play-config/<id> with Popcorn-SDK-Version: 8 and deviceType: android-tv.

Testing

Tested on LibreELEC 12.2.1 (Kodi 21.2, aarch64) with a STREAMZ_BASIC account:

  • Login with device code, profile selection
  • Main menu, Recommendations, Films, Series, Kids, My List, Search
  • Opening a program (episodes listed) and a movie
  • Playing an episode: 1080p DASH with Widevine

Not tested: programs with multiple seasons, "Continue watching" with content, subtitles, token refresh after 24 hours, and the unit tests (they need the ADDON_TOKEN secret). test_get_config will still fail: lfvp-android-api.dpgmedia.net no longer resolves. Pylint is clean except for R0917 too-many-positional-arguments, which also fails on master with current pylint.

🤖 Generated with Claude Code

- Inloggen: OAuth id_token als Bearer, /STREAMZ/id-token i.p.v. /tokens, verversen via refresh_token (scope offline_access)
- Headers app-versie 28 (Android TV); de oude versie 15 gaf 426 Upgrade Required
- Profielen: type MAIN/KIDS i.p.v. mainProfile/kidsProfile
- Storefront 'movies' heet nu 'films'
- Teasers hebben enkel nog detailId: nieuwe Teaser-route, detail3 bepaalt film of serie
- Films spelen af via primaryButton.playableId
- Video-info via videoplayer-service.dpgmedia.net/play-config, Popcorn SDK 8
- Verder kijken: rij-id dynamisch uit de hoofdpagina
@snauwaertc

Copy link
Copy Markdown
Author

@michaelarnauts please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error while opening streamz

1 participant