Skip to content

Commit

Permalink
Add Studio Brussel and MNM live streams (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagwieers committed Apr 30, 2019
1 parent 6e8df5a commit c643ba6
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
16 changes: 16 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
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
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
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
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

0 comments on commit c643ba6

Please sign in to comment.