Skip to content

Commit

Permalink
fix playback issue with Kodi Leia (thanks to egolus)
Browse files Browse the repository at this point in the history
use inputstream for Kodi Leia (thanks to MRLB)
submit content-type for auth
  • Loading branch information
hubsif committed Sep 3, 2018
1 parent 8e0c78a commit 49d606b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.video.telekomsport" name="Telekom Sport" version="1.2.1" provider-name="hubsif">
<addon id="plugin.video.telekomsport" name="Telekom Sport" version="1.2.2" provider-name="hubsif">
<requires>
<import addon="xbmc.python" version="2.5.0"/>
</requires>
Expand All @@ -19,6 +19,10 @@
<fanart>fanart.jpg</fanart>
</assets>
<news>
v1.2.2 (2018-08-27)
- fix playback issue with Kodi Leia (thanks to egolus)
- use inputstream for Kodi Leia (thanks to MRLB)
- submit content-type for auth
v1.2.1 (2017-10-17)
- fix some content not playing (editorialLanes with multiple videos)
v1.2.0 (2017-09-26)
Expand Down
6 changes: 5 additions & 1 deletion default.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def utc_offset():

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

if 'access_token' in jsonResult:
Expand Down Expand Up @@ -219,6 +219,7 @@ def geteventLane():

if event['metadata']['state'] == 'live':
li.setProperty('IsPlayable', 'true')
li.setInfo('video', {})
xbmcplugin.addDirectoryItem(handle=_addon_handler, url=url, listitem=li)
elif not ('onlylive' in args and args['onlylive']):
xbmcplugin.addDirectoryItem(handle=_addon_handler, url=url, listitem=li, isFolder=True)
Expand Down Expand Up @@ -261,6 +262,7 @@ def getevent():
li = xbmcgui.ListItem(eventVideo['title'], iconImage='https://www.telekomsport.de' + eventVideo['images']['editorial'])
li.setProperty('fanart_image', 'https://www.telekomsport.de' + eventVideo['images']['editorial'])
li.setProperty('IsPlayable', 'true')
li.setInfo('video', {})
xbmcplugin.addDirectoryItem(handle=_addon_handler, url=url, listitem=li)
xbmcplugin.endOfDirectory(_addon_handler)

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

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


Expand Down

0 comments on commit 49d606b

Please sign in to comment.