Closed code-80 closed 2 years ago
I confirm this issue. Changes done by RTP I can see so far:
fileKey: atob(decodeURIComponent(["L25hczI","uc2hhcm","UvaDI2N","C81MTJ4","Mzg0L3A","4MjkxL3","A4MjkxX","zFfMjAy","MTAyMDU","yMzU5NT","YzMzgwL","m1wNA%3","D%3D"].join(""))), file: {hls : atob(decodeURIComponent(["aHR0cH","M6Ly9z","dHJlYW","1pbmct","b25kZW","1hbmQu","cnRwLn","B0L25h","czIuc2","hhcmUv","aDI2NC","81MTJ4","Mzg0L3","A4Mjkx","L3A4Mj","kxXzFf","MjAyMT","AyMDUy","MzU5NT","YzMzgw","L21hc3","Rlci5t","M3U4"].join(""))), dash : atob(decodeURIComponent(["aHR0cH","M6Ly9z","dHJlYW","1pbmct","b25kZW","1hbmQu","cnRwLn","B0L25h","czIuc2","hhcmUv","aDI2NC","81MTJ4","Mzg0L3","A4Mjkx","L3A4Mj","kxXzFf","MjAyMT","AyMDUy","MzU5NT","YzMzgw","L21hc3","Rlci5t","cGQ%3D"].join(""))) }, seekBarThumbnailsLoc: '//cdn-images.rtp.pt/multimedia/screenshots/p8291/preview/p8291_1_202102052359563380_preview.vtt',
Ah, what a proper use of our taxes... :)
I have a working fix, just looking into the subtitles thing before PRing
Live TV seems to be broken too :( will look into it
EDIT: It seems they've added a token to the url :/ https://streaming-live.rtp.pt/liverepeater/smil:rtp1HD.smil/playlist.m3u8?token=1613970000_43e4eaac69b4592b19d33b367326db4da0ee33ae
We might have to fetch it directly from the DOM
Note Kodi doesn't support yet vtt subs, some vtt to srt logic is needed
The recorded episodes in the #estudoemcasa area only run the 6sec preview clips. Would this fix this issue as well?
The recorded episodes in the #estudoemcasa area only run the 6sec preview clips. Would this fix this issue as well?
I tried latest master on two different Kodi systems and it gave me this error:
2021-02-24 09:18:44.981 T:139945159423552 DEBUG: CPythonInvoker(1, /home/user/.kodi/addons/plugin.video.rtpplay/main.py): instantiating addon using automatically obtained id of "plugin.video.rtpplay" dependent on version 2.25.0 of the xbmc.python api
2021-02-24 09:18:45.033 T:139945159423552 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named parse
Traceback (most recent call last):
File "/home/user/.kodi/addons/plugin.video.rtpplay/main.py", line 3, in <module>
from resources.lib import kodilogging
File "/home/user/.kodi/addons/plugin.video.rtpplay/resources/lib/kodilogging.py", line 4, in <module>
from resources.lib.kodiutils import get_setting_as_bool
File "/home/user/.kodi/addons/plugin.video.rtpplay/resources/lib/kodiutils.py", line 12, in <module>
from urllib.parse import unquote
ImportError: No module named parse
-->End of Python script error report<--
Related: https://forum.kodi.tv/showthread.php?tid=353208
I fixed it using the last suggestion:
try:
from urllib.parse import unquote
except ImportError:
from urlparse import unquote
I tried latest master on two different Kodi systems and it gave me this error:
2021-02-24 09:18:44.981 T:139945159423552 DEBUG: CPythonInvoker(1, /home/user/.kodi/addons/plugin.video.rtpplay/main.py): instantiating addon using automatically obtained id of "plugin.video.rtpplay" dependent on version 2.25.0 of the xbmc.python api 2021-02-24 09:18:45.033 T:139945159423552 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.ImportError'> Error Contents: No module named parse Traceback (most recent call last): File "/home/user/.kodi/addons/plugin.video.rtpplay/main.py", line 3, in <module> from resources.lib import kodilogging File "/home/user/.kodi/addons/plugin.video.rtpplay/resources/lib/kodilogging.py", line 4, in <module> from resources.lib.kodiutils import get_setting_as_bool File "/home/user/.kodi/addons/plugin.video.rtpplay/resources/lib/kodiutils.py", line 12, in <module> from urllib.parse import unquote ImportError: No module named parse -->End of Python script error report<--
Related: https://forum.kodi.tv/showthread.php?tid=353208
I fixed it using the last suggestion:
try: from urllib.parse import unquote except ImportError: from urlparse import unquote
Ah, I failed to consider both python versions. Thank you, I'll add that change (unless you want to PR it?)
Please add the change. Here is the patch I used in the end:
diff --git a/resources/lib/kodiutils.py b/resources/lib/kodiutils.py
index e986d53..4f16f4f 100644
--- a/resources/lib/kodiutils.py
+++ b/resources/lib/kodiutils.py
@@ -9,13 +9,14 @@ import logging
import json as json
import re
import base64
-from urllib.parse import unquote
PY3 = sys.version_info > (3, 0)
if PY3:
+ from urllib.parse import unquote
from html.parser import HTMLParser
else:
+ from urlparse import unquote
from HTMLParser import HTMLParser
I realized you already have a section for checking py3 or py2 imports so used that.
Fixed on release 6.0.0 https://github.com/enen92/plugin.video.rtpplay/releases/tag/6.0.0
empty 'Programs' listings. No stream available.