Skip to content

Commit 83c5469

Browse files
committed
fix some content not playing (editorialLanes with multiple videos), closes #8
1 parent a61186d commit 83c5469

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

addon.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<addon id="plugin.video.telekomsport" name="Telekom Sport" version="1.2.0" provider-name="hubsif">
2+
<addon id="plugin.video.telekomsport" name="Telekom Sport" version="1.2.1" provider-name="hubsif">
33
<requires>
44
<import addon="xbmc.python" version="2.5.0"/>
55
</requires>
@@ -18,6 +18,8 @@
1818
<fanart>fanart.jpg</fanart>
1919
</assets>
2020
<news>
21+
v1.2.1 (2017-10-17)
22+
- fix some content not playing (editorialLanes with multiple videos)
2123
v1.2.0 (2017-09-26)
2224
- fix streaming url
2325
- add sky gamereports

default.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ def geteventLane():
217217
li.setInfo('video', {'plot': prettydate(scheduled_start)})
218218
li.setProperty('fanart_image', 'https://www.telekomsport.de' + event['metadata']['images']['editorial'])
219219

220-
# assuming editorialLane always only has one video
221-
if event['metadata']['state'] == 'live' or jsonResult['data']['type'] == 'editorialLane':
220+
if event['metadata']['state'] == 'live':
222221
li.setProperty('IsPlayable', 'true')
223222
xbmcplugin.addDirectoryItem(handle=_addon_handler, url=url, listitem=li)
224223
elif not ('onlylive' in args and args['onlylive']):
@@ -249,8 +248,8 @@ def getevent():
249248
isLivestream = 'islivestream' in jsonResult['data']['content'][0]['group_elements'][0]['data'][0] and jsonResult['data']['content'][0]['group_elements'][0]['data'][0]['islivestream']
250249
isPay = 'pay' in jsonResult['data']['content'][0]['group_elements'][0]['data'][0] and jsonResult['data']['content'][0]['group_elements'][0]['data'][0]['pay']
251250
url = build_url({'mode': 'video', 'videoid': jsonResult['data']['content'][0]['group_elements'][0]['data'][0]['videoID'], 'isLivestream': isLivestream, 'isPay': isPay})
252-
listitem = xbmcgui.ListItem(path=url)
253-
xbmcplugin.setResolvedUrl(_addon_handler, True, listitem)
251+
xbmc.Player().play(url)
252+
xbmcplugin.endOfDirectory(_addon_handler, succeeded=False)
254253
else:
255254
for content in jsonResult['data']['content']:
256255
for group_element in content['group_elements']:

0 commit comments

Comments
 (0)