diff options
author | pietje666 <martijn.moreel@gmail.com> | 2017-10-02 01:55:40 +0200 |
---|---|---|
committer | learningit <scottyroscoe13@gmail.com> | 2017-10-01 19:55:40 -0400 |
commit | 3acc2fd687175d4768530f6983b9149566388217 (patch) | |
tree | 233e3ebb45e37a407214611dc72754708d1fcc1a | |
parent | 82e567c010af596f10a37acb50a4cc50cdb1bd8e (diff) |
[plugin.video.vrt.nu] 1.0.0 (#1439)
4 files changed, 17 insertions, 8 deletions
diff --git a/plugin.video.vrt.nu/addon.xml b/plugin.video.vrt.nu/addon.xml index 6bbb81b..3969872 100644 --- a/plugin.video.vrt.nu/addon.xml +++ b/plugin.video.vrt.nu/addon.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="plugin.video.vrt.nu" name="VRT Nu" - version="0.0.7" + version="1.0.0" provider-name="Martijn Moreel"> <requires> @@ -23,6 +23,10 @@ <platform>all</platform> <license>GNU General Public License, v3</license> <news> +v1.0.0 (01-10-2017) +- Fixed issue where all the videos would not be able to play, implemented new way of getting the streaming urls +- Fixed bug where a single video would not be listed when there is also a part "ANDEREN BEKEKEN OOK" present +- New versioning system now starting from 1.0.0 v0.0.7 (09-09-2017) - Fixed bug where dates were not always shown v0.0.6 (06-08-2017) diff --git a/plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py b/plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py index c2df058..7edcccd 100644 --- a/plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py +++ b/plugin.video.vrt.nu/resources/lib/kodiwrappers/kodiwrapper.py @@ -42,7 +42,6 @@ class KodiWrapper: stream = stream_service.get_stream_from_url(path) if stream is not None: play_item = xbmcgui.ListItem(path=stream.stream_url) - play_item.setMimeType('application/x-mpegURL') if stream.subtitle_url is not None: play_item.setSubtitles([stream.subtitle_url]) xbmcplugin.setResolvedUrl(self._handle, True, listitem=play_item) diff --git a/plugin.video.vrt.nu/resources/lib/vrtplayer/urltostreamservice.py b/plugin.video.vrt.nu/resources/lib/vrtplayer/urltostreamservice.py index 1d3cecc..f295d65 100644 --- a/plugin.video.vrt.nu/resources/lib/vrtplayer/urltostreamservice.py +++ b/plugin.video.vrt.nu/resources/lib/vrtplayer/urltostreamservice.py @@ -44,13 +44,13 @@ class UrlToStreamService: '"email": "%s"}' % (uid, sig, ts, cred.username) response = self._session.post("https://token.vrt.be", data=data, headers=headers) - securevideo_url = "{0}.securevideo.json".format(self.__cut_slash_if_present(url)) + securevideo_url = "{0}.mssecurevideo.json".format(self.__cut_slash_if_present(url)) securevideo_response = self._session.get(securevideo_url, cookies=response.cookies) json = securevideo_response.json() - mzid = list(json - .values())[0]['mzid'] - final_url = urlparse.urljoin(self._BASE_GET_STREAM_URL_PATH, mzid) + video_id = list(json + .values())[0]['videoid'] + final_url = urlparse.urljoin(self._BASE_GET_STREAM_URL_PATH, video_id) stream_response = self._session.get(final_url) hls = self.__get_hls(stream_response.json()['targetUrls']).replace("https", "http") diff --git a/plugin.video.vrt.nu/resources/lib/vrtplayer/vrtplayer.py b/plugin.video.vrt.nu/resources/lib/vrtplayer/vrtplayer.py index 6d1f896..3b413ce 100644 --- a/plugin.video.vrt.nu/resources/lib/vrtplayer/vrtplayer.py +++ b/plugin.video.vrt.nu/resources/lib/vrtplayer/vrtplayer.py @@ -97,14 +97,20 @@ class VRTPlayer: if len(option_tags) != 0: title_items.extend(self.__get_episodes(option_tags)) else: - episodes = soup.find_all(class_="tile") - if len(episodes) != 0: + episodes_list_slider = soup.find(id="episodelist__slider") + if episodes_list_slider is not None: title_items.extend(self.__get_multiple_videos(soup)) else: title_items.extend(self.__get_single_video(relevant_path.url, soup)) return title_items + def __get_episodes(self, option_tags): + """ + This method gets all the episodes = seasons from the dropdownmenus on the vrt.nu website + :param option_tags: + :return: + """ title_items = [] for option_tag in option_tags: title = statichelper.replace_newlines_and_strip(option_tag.text) |