Skip to content

Commit 49d606b

Browse files
committed
fix playback issue with Kodi Leia (thanks to egolus)
use inputstream for Kodi Leia (thanks to MRLB) submit content-type for auth
1 parent 8e0c78a commit 49d606b

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

addon.xml

Lines changed: 5 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.1" provider-name="hubsif">
2+
<addon id="plugin.video.telekomsport" name="Telekom Sport" version="1.2.2" provider-name="hubsif">
33
<requires>
44
<import addon="xbmc.python" version="2.5.0"/>
55
</requires>
@@ -19,6 +19,10 @@
1919
<fanart>fanart.jpg</fanart>
2020
</assets>
2121
<news>
22+
v1.2.2 (2018-08-27)
23+
- fix playback issue with Kodi Leia (thanks to egolus)
24+
- use inputstream for Kodi Leia (thanks to MRLB)
25+
- submit content-type for auth
2226
v1.2.1 (2017-10-17)
2327
- fix some content not playing (editorialLanes with multiple videos)
2428
v1.2.0 (2017-09-26)

default.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def utc_offset():
6868

6969
def get_jwt(username, password):
7070
data = { "claims": "{'id_token':{'urn:telekom.com:all':null}}", "client_id": "10LIVESAM30000004901TSMAPP00000000000000", "grant_type": "password", "scope": "tsm offline_access", "username": username, "password": password }
71-
response = urllib.urlopen(oauth_url + '?' + urllib.urlencode(data), "").read()
71+
response = urllib2.urlopen(urllib2.Request(oauth_url, urllib.urlencode(data), {'Content-Type': 'application/json'})).read()
7272
jsonResult = json.loads(response)
7373

7474
if 'access_token' in jsonResult:
@@ -219,6 +219,7 @@ def geteventLane():
219219

220220
if event['metadata']['state'] == 'live':
221221
li.setProperty('IsPlayable', 'true')
222+
li.setInfo('video', {})
222223
xbmcplugin.addDirectoryItem(handle=_addon_handler, url=url, listitem=li)
223224
elif not ('onlylive' in args and args['onlylive']):
224225
xbmcplugin.addDirectoryItem(handle=_addon_handler, url=url, listitem=li, isFolder=True)
@@ -261,6 +262,7 @@ def getevent():
261262
li = xbmcgui.ListItem(eventVideo['title'], iconImage='https://www.telekomsport.de' + eventVideo['images']['editorial'])
262263
li.setProperty('fanart_image', 'https://www.telekomsport.de' + eventVideo['images']['editorial'])
263264
li.setProperty('IsPlayable', 'true')
265+
li.setInfo('video', {})
264266
xbmcplugin.addDirectoryItem(handle=_addon_handler, url=url, listitem=li)
265267
xbmcplugin.endOfDirectory(_addon_handler)
266268

@@ -297,6 +299,8 @@ def getvideo():
297299
auth = xmlroot.find('token').get('auth')
298300

299301
listitem = xbmcgui.ListItem(path=playlisturl + "?hdnea=" + auth)
302+
listitem.setProperty('inputstreamaddon', 'inputstream.adaptive')
303+
listitem.setProperty('inputstream.adaptive.manifest_type', 'hls')
300304
xbmcplugin.setResolvedUrl(_addon_handler, True, listitem)
301305

302306

0 commit comments

Comments
 (0)