From 13207144a482581e773ec9c2f6bdfc2145c6d4e0 Mon Sep 17 00:00:00 2001 From: enen92 <92enen@gmail.com> Date: Thu, 4 Jan 2018 22:58:19 +0000 Subject: [plugin.video.rtpplay] 3.0.2 --- plugin.video.rtpplay/addon.xml | 4 ++-- .../resources/language/resource.language.en_gb/strings.po | 4 ++++ plugin.video.rtpplay/resources/lib/plugin.py | 9 ++++++--- plugin.video.rtpplay/resources/settings.xml | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/plugin.video.rtpplay/addon.xml b/plugin.video.rtpplay/addon.xml index 2f75318..ee7d9b6 100644 --- a/plugin.video.rtpplay/addon.xml +++ b/plugin.video.rtpplay/addon.xml @@ -1,5 +1,5 @@ - + @@ -18,7 +18,7 @@ http://rtp.pt/play enen92@kodi.tv https://github.com/enen92/plugin.video.rtpplay - Regex + A 20 seconds fix for live streams The plugin is unnoficial and not endorsed by RTP. Expect it to break. icon.png diff --git a/plugin.video.rtpplay/resources/language/resource.language.en_gb/strings.po b/plugin.video.rtpplay/resources/language/resource.language.en_gb/strings.po index b35a0ec..7830488 100644 --- a/plugin.video.rtpplay/resources/language/resource.language.en_gb/strings.po +++ b/plugin.video.rtpplay/resources/language/resource.language.en_gb/strings.po @@ -26,4 +26,8 @@ msgstr "" msgctxt "#32002" msgid "Could not grab stream url. The plugin needs an update." +msgstr "" + +msgctxt "#32003" +msgid "Debug" msgstr "" \ No newline at end of file diff --git a/plugin.video.rtpplay/resources/lib/plugin.py b/plugin.video.rtpplay/resources/lib/plugin.py index deecfb3..9149a4d 100644 --- a/plugin.video.rtpplay/resources/lib/plugin.py +++ b/plugin.video.rtpplay/resources/lib/plugin.py @@ -65,9 +65,12 @@ def play(): exit(0) is_pseudo_aes = bool(re.findall("var aes = true", req)) - - streams = re.compile('new RTPPlayer\(.*file\:.+?"(.+?)"', re.DOTALL).findall(req) - + + player = re.findall("liveMetadata.+?'(\d+)'\)", req) + player = player[0].strip() if player else '' + + streams = re.compile('var player{}.+?RTPPlayer.+?file\:.+?"(.+?)"'.format(player),re.DOTALL).findall(req) + if streams: final_stream_url = None for stream in streams: diff --git a/plugin.video.rtpplay/resources/settings.xml b/plugin.video.rtpplay/resources/settings.xml index 96f7359..284bd41 100644 --- a/plugin.video.rtpplay/resources/settings.xml +++ b/plugin.video.rtpplay/resources/settings.xml @@ -1,5 +1,5 @@ - + -- cgit v1.2.3