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

Add Studio Brussel and MNM live streams #166

Merged
merged 1 commit into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,22 @@ msgctxt "#32132"
msgid "Watch Sporza live TV stream (via Internet)"
msgstr "Watch Sporza live TV stream via (Internet)"

msgctxt "#32141"
msgid "Studio Brussel live"
msgstr "Studio Brussel live"

msgctxt "#32142"
msgid "Watch Studio Brussel live TV stream (via Internet)"
msgstr "Watch Studio Brussel live TV stream via (Internet)"

msgctxt "#32151"
msgid "MNM live"
msgstr "MNM live"

msgctxt "#32152"
msgid "Watch MNM live TV stream (via Internet)"
msgstr "Watch MNM live TV stream via (Internet)"

msgctxt "#32201"
msgid "[B][COLOR red]Geo-blocked[/COLOR][/B]\n"
msgstr "[B][COLOR red]Geo-blocked[/COLOR][/B]\n"
Expand Down
16 changes: 16 additions & 0 deletions resources/language/resource.language.nl_nl/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,22 @@ msgctxt "#32132"
msgid "Watch Sporza live TV stream (via Internet)"
msgstr "Bekijk Sporza live tv stream (via Internet)"

msgctxt "#32141"
msgid "Studio Brussel live"
msgstr "Studio Brussel live"

msgctxt "#32142"
msgid "Watch Studio Brussel live TV stream (via Internet)"
msgstr "Watch Studio Brussel live TV stream via (Internet)"

msgctxt "#32151"
msgid "MNM live"
msgstr "MNM live"

msgctxt "#32152"
msgid "Watch MNM live TV stream (via Internet)"
msgstr "Watch MNM live TV stream via (Internet)"

msgctxt "#32201"
msgid "[B][COLOR red]Geo-blocked[/COLOR][/B]\n"
msgstr "[B][COLOR red]Geo-geblokkeerd[/COLOR][/B]\n"
Expand Down
8 changes: 6 additions & 2 deletions resources/lib/vrtplayer/streamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,18 @@ def _fix_virtualsubclip(stream_dict, duration):
return stream_dict

def get_stream(self, video, retry=False, api_data=None):
self._kodi_wrapper.log_notice('video_url ' + video.get('video_url'))
video_url = video.get('video_url')
self._kodi_wrapper.log_notice('video_url ' + video_url)
video_id = video.get('video_id')
publication_id = video.get('publication_id')
if video_id and publication_id and not retry:
xvrttoken = self.token_resolver.get_xvrttoken()
api_data = apidata.ApiData(self._CLIENT, self._VUALTO_API_URL, video_id, publication_id + requests.utils.quote('$'), xvrttoken, False)
# Support .mpd streams directly
elif video_url.endswith('.mpd'):
return streamurls.StreamURLS(video_url, use_inputstream_adaptive=True)
else:
api_data = api_data or self._get_api_data(video.get('video_url'))
api_data = api_data or self._get_api_data(video_url)

vudrm_token = None
video_json = self._get_video_json(api_data)
Expand Down
20 changes: 20 additions & 0 deletions resources/lib/vrtplayer/vrtplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,26 @@ def show_livestream_items(self):
art_dict=dict(thumb=self.__get_media('ketnet.png'), icon='DefaultAddonPVRClient.png', fanart=self._api_helper.get_live_screenshot('ketnet')),
video_dict=dict(plot=self._kodi_wrapper.get_localized_string(32201) + '\n' + self._kodi_wrapper.get_localized_string(32122)),
),
helperobjects.TitleItem(
title=self._kodi_wrapper.get_localized_string(32141),
url_dict=dict(
action=actions.PLAY,
video_url='https://live-radio-cf-vrt.akamaized.net/groupb/live/0f394a26-c87d-475e-8590-e9c6e79b28d9/live.isml/.mpd',
),
is_playable=True,
art_dict=dict(thumb='DefaultMusicAddon.png', icon='DefaultAddonPVRClient.png', fanart='DefaultAddonPVRClient.png'),
video_dict=dict(plot=self._kodi_wrapper.get_localized_string(32142)),
),
helperobjects.TitleItem(
title=self._kodi_wrapper.get_localized_string(32151),
url_dict=dict(
action=actions.PLAY,
video_url='https://live-radio-cf-vrt.akamaized.net/groupa/live/bac277a1-306d-44a0-8e2e-e5b9c07fa270/live.isml/.mpd',
),
is_playable=True,
art_dict=dict(thumb='DefaultMusicAddon.png', icon='DefaultAddonPVRClient.png', fanart='DefaultAddonPVRClient.png'),
video_dict=dict(plot=self._kodi_wrapper.get_localized_string(32152)),
),
]
self._kodi_wrapper.show_listing(livestream_items, content_type='videos')

Expand Down