Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF1Plus: 403 when fetching index.mpd #1428

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Nitorac
Copy link

@Nitorac Nitorac commented Nov 15, 2024

PR to fix #1427.
It has been tested successfully on LibreElec 12.0.1 with Kodi 21.1.0:

  • TF1Plus: The live channel is working
  • A dozen of other FR channels are not impacted (live nor replay)

/!: IMHO: it could be useful to make the get_stream_with_quality method differenciate the headers given to inputstream.adaptive.stream_headers (+ inputstream.adaptive.manifest_headers) and the headers given to the DRM license requests.
Because such a change should impact almost all already implemented channels, I have added a parameter to the method which emulates to old behavior when it's None, and used as I want when filled.

I'm open to improvments, I'm not really happy with the parameter name nor the "workaround" behavior !

@Nitorac Nitorac marked this pull request as draft November 15, 2024 00:42
@Nitorac
Copy link
Author

Nitorac commented Nov 15, 2024

Revert to Draft since the testing may not have covered the use-case (#1427 (comment))

Copy link
Contributor

@joaopa00 joaopa00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Un petit changement de style pour garder la lisibilité du code:

# use custom_license_headers only if it is set, else fallback to stream_headers
if custom_license_headers:
    license_headers = urlencode(custom_license_headers)  
 else:
    license_headers = stream_headers
license_url = '%s|%s|R{SSM}|' % (license_url, license_headers)

au lieu de

license_url = '%s|%s|R{SSM}|' % (license_url, urlencode(custom_license_headers) if custom_license_headers else stream_headers) # use custom_license_headers only if it is set, else fallback to stream_headers

@joaopa00 joaopa00 marked this pull request as ready for review November 16, 2024 01:11
@joaopa00
Copy link
Contributor

joaopa00 commented Nov 16, 2024

Flake8 complains
./resources/lib/channels/fr/tf1plus.py:438:103: W291 trailing whitespace
./resources/lib/resolver_proxy.py:269:39: E261 at least two spaces before inline comment

@Nitorac
Copy link
Author

Nitorac commented Nov 16, 2024

(i'm still waiting for a DRM-protected show on TF1 to confirm that it fixes the issue !)

@joaopa00
Copy link
Contributor

So I will wait for a few days before merging.

@joaopa00
Copy link
Contributor

des nouvelles?

@Nitorac
Copy link
Author

Nitorac commented Nov 26, 2024

Je regarde plusieurs fois par jour, et j'arrive toujours pas à en trouver, je vais me faire un petit robot pour surveiller quand est-ce qu'un flux protégé par Widevine passe sur tf1+.
Après si c'est embêtant que ça reste là, on peut fermer la PR et je renverrai un message ici quand j'aurai eu une émission qui pousse widevine et que j'aurai pu vérifier que le fix est correct !

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.

TF1PLUS - Live not starting - 403 error when fetching MPD index
2 participants