enen92 / plugin.video.rtpplay

RTP Play Video Addon for KODI Entertainment Center
Other
30 stars 13 forks source link

'Programs' section - stopped working altogether #33

Closed code-80 closed 2 years ago

code-80 commented 3 years ago

empty 'Programs' listings. No stream available.

guipenedo commented 3 years ago

I confirm this issue. Changes done by RTP I can see so far:

enen92 commented 3 years ago

Ah, what a proper use of our taxes... :)

guipenedo commented 3 years ago

I have a working fix, just looking into the subtitles thing before PRing

guipenedo commented 3 years ago

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

enen92 commented 3 years ago

Note Kodi doesn't support yet vtt subs, some vtt to srt logic is needed

bjaraujo commented 3 years ago

The recorded episodes in the #estudoemcasa area only run the 6sec preview clips. Would this fix this issue as well?

guipenedo commented 3 years ago

The recorded episodes in the #estudoemcasa area only run the 6sec preview clips. Would this fix this issue as well?

34 fixes this yes

bjaraujo commented 3 years ago

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
guipenedo commented 3 years ago

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?)

bjaraujo commented 3 years ago

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.

guipenedo commented 2 years ago

Fixed on release 6.0.0 https://github.com/enen92/plugin.video.rtpplay/releases/tag/6.0.0