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 Ketnet Junior #208

Merged
merged 1 commit into from
May 10, 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
2 changes: 2 additions & 0 deletions resources/lib/vrtplayer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
name='ketnet-jr',
label='Ketnet Junior',
studio='Ketnet Junior',
live_stream='https://www.ketnet.be/kijken/ketnet-junior-livestream',
live_stream_url='https://content.uplynk.com/channel/e11a05356cc44198977436418ad71832.m3u8',
),
dict(
id='O9',
Expand Down
2 changes: 2 additions & 0 deletions resources/lib/vrtplayer/streamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ def _fix_virtualsubclip(stream_dict, duration):
def get_stream(self, video, retry=False, api_data=None):
'''Main streamservice function'''
from datetime import timedelta
if not video.get('video_id') and video.get('video_url'):
return streamurls.StreamURLS(video.get('video_url'))
if not api_data:
api_data = self._get_api_data(video)

Expand Down
6 changes: 4 additions & 2 deletions resources/lib/vrtplayer/vrtplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def show_channels_menu_items(self, channel=None):
self.show_channels(action=actions.LISTING_CHANNELS, channels=[c.get('name') for c in CHANNELS])

def show_livestream_items(self):
self.show_channels(action=actions.PLAY, channels=['een', 'canvas', 'sporza', 'ketnet', 'stubru', 'mnm'])
self.show_channels(action=actions.PLAY, channels=['een', 'canvas', 'sporza', 'ketnet-jr', 'ketnet', 'stubru', 'mnm'])

def show_channels(self, action=actions.PLAY, channels=None):
from resources.lib.vrtplayer import CHANNELS
Expand Down Expand Up @@ -105,7 +105,9 @@ def show_channels(self, action=actions.PLAY, channels=None):
self._kodi_wrapper.get_localized_string(30102) % channel.get('label'))
else:
plot = self._kodi_wrapper.get_localized_string(30102) % channel.get('label')
if channel.get('live_stream'):
if channel.get('live_stream_url'):
url_dict['video_url'] = channel.get('live_stream_url')
elif channel.get('live_stream'):
url_dict['video_url'] = channel.get('live_stream')
if channel.get('live_stream_id'):
url_dict['video_id'] = channel.get('live_stream_id')
Expand Down