Re-register the device only for football licence requests (error 4027 recovery) #1

Open
opened 2026-11-13 12:23:51 +00:00 by xocko · 0 comments
Owner

Since 1.0.0+kodimov.10 the LALIGA, DAZN LALIGA and Liga de Campeones channels play, but the licence server refuses the first licence request for one of them with error 4027 every time (5 of 5 on 2026-11-13). Upstream's "Try to fix error 4027" recovery in resources/lib/proxy.py gets the licence: it removes the device from the account, registers it again and retries.

The problem is what happens afterwards. Once that recovery has run, reregister_needed stays set for as long as the proxy lives, so the add-on removes and re-registers the device before every licence request, on any channel, until Kodi restarts. With football this now starts once per Kodi session. It is the most unusual thing the add-on does towards Movistar and the most likely to stand out on the account.

Proposal

Re-register the device only for licence requests of the football channels (the ones marked new_api), and never for the other channels:

  • pass a marker for these channels from play() to the licence URL the proxy receives (next to stype and session_request);
  • in the proxy, re-register before the request only when the marker is present, which also saves the refused first request;
  • keep upstream's behaviour (retry once after a 4027) for everything else, but clear the flag after a licence is granted instead of leaving it set for the rest of the session.

What is known

  • A normal channel (M+ Deportes) got its licence without re-registering, same device and token.
  • A pause of 1.5 s and a plain retry is refused again; only the re-registration helps.
  • A football request was refused again 7 minutes after a re-registration (the add-on had been reloaded and its tokens renewed in between), so "once per session" or "once every N minutes" is not known to be enough.

Open questions (need test playbacks, kept to a minimum: Movistar's servers block after bursts of requests)

  • Does a re-registration stay valid for later football requests if nothing else changes, and what undoes it (the 5-minute token renewal)?
  • Would the licence be granted without re-registering if the request used the session of the web player device (the one registered for the new servers) instead of the classic one?
Since 1.0.0+kodimov.10 the LALIGA, DAZN LALIGA and Liga de Campeones channels play, but the licence server refuses the first licence request for one of them with error 4027 every time (5 of 5 on 2026-11-13). Upstream's "Try to fix error 4027" recovery in `resources/lib/proxy.py` gets the licence: it removes the device from the account, registers it again and retries. The problem is what happens afterwards. Once that recovery has run, `reregister_needed` stays set for as long as the proxy lives, so the add-on removes and re-registers the device before **every** licence request, on **any** channel, until Kodi restarts. With football this now starts once per Kodi session. It is the most unusual thing the add-on does towards Movistar and the most likely to stand out on the account. ## Proposal Re-register the device only for licence requests of the football channels (the ones marked `new_api`), and never for the other channels: - pass a marker for these channels from `play()` to the licence URL the proxy receives (next to `stype` and `session_request`); - in the proxy, re-register before the request only when the marker is present, which also saves the refused first request; - keep upstream's behaviour (retry once after a 4027) for everything else, but clear the flag after a licence is granted instead of leaving it set for the rest of the session. ## What is known - A normal channel (M+ Deportes) got its licence without re-registering, same device and token. - A pause of 1.5 s and a plain retry is refused again; only the re-registration helps. - A football request was refused again 7 minutes after a re-registration (the add-on had been reloaded and its tokens renewed in between), so "once per session" or "once every N minutes" is not known to be enough. ## Open questions (need test playbacks, kept to a minimum: Movistar's servers block after bursts of requests) - Does a re-registration stay valid for later football requests if nothing else changes, and what undoes it (the 5-minute token renewal)? - Would the licence be granted without re-registering if the request used the session of the web player device (the one registered for the new servers) instead of the classic one?
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xocko/kodimovplus#1