Skip to content

Commit

Permalink
fix streaming url, closes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
hubsif committed Sep 26, 2017
1 parent 4a8fc3f commit a61186d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
5 changes: 4 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.1.1" provider-name="hubsif">
<addon id="plugin.video.telekomsport" name="Telekom Sport" version="1.2.0" provider-name="hubsif">
<requires>
<import addon="xbmc.python" version="2.5.0"/>
</requires>
Expand All @@ -18,6 +18,9 @@
<fanart>fanart.jpg</fanart>
</assets>
<news>
v1.2.0 (2017-09-26)
- fix streaming url
- add sky gamereports
v1.1.1 (2017-09-25)
- fix menu for eventlanes
v1.1.0 (2017-09-11)
Expand Down
14 changes: 6 additions & 8 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
oauth_url = "https://accounts.login.idm.telekom.com/oauth2/tokens"
jwt_url = "https://www.telekomsport.de/service/auth/app/login/jwt"
heartbeat_url = "https://www.telekomsport.de/service/heartbeat"
stream_url = "https://www.telekomsport.de/service/player/streamAccess"
main_page = "/navigation"

###########
Expand Down Expand Up @@ -267,6 +268,7 @@ def getevent():
def getvideo():
videoid = args['videoid']

jwt = None
if args['isPay'] == 'True':
if not _addon.getSetting('username'):
xbmcgui.Dialog().ok(_addon_name, __language__(30007))
Expand All @@ -283,15 +285,11 @@ def getvideo():
xbmcgui.Dialog().ok(_addon_name, __language__(30005))
return

partnerid = '2780'
unassecret = 'aXHi21able'
timestamp = datetime.utcnow().strftime('%Y%m%d%H%M%S')
ident = str(randint(10000000, 99999999)) + str(int(time.time()))
streamtype = 'live' if args['isLivestream'] == 'True' else 'vod'
jwt = jwt or 'empty'

auth = md5.new(videoid + partnerid + timestamp + unassecret).hexdigest()

url = 'https://streamaccess.unas.tv/hdflash2/' + streamtype + '/' + partnerid + '/' + videoid + '.xml?format=iphone&streamid=' + videoid + '&partnerid=' + partnerid + '&ident=' + ident + '&timestamp=' + timestamp + '&auth=' + auth
response = urllib2.urlopen(urllib2.Request(stream_url, json.dumps({ 'videoId': videoid}), {'xauthorization': jwt, 'Content-Type': 'application/json'})).read()
jsonResult = json.loads(response)
url = 'https:' + jsonResult['data']['stream-access'][0]

response = urllib.urlopen(url).read()

Expand Down
4 changes: 2 additions & 2 deletions resources/language/resource.language.de_de/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ msgid "CURRENTLY RUNNING"
msgstr "JETZT LIVE"

msgctxt "#30005"
msgid "Error authenticating. Please check username and password."
msgstr "Fehler bei der Authentifizierung. Bitte überprüfe Benutzername und Passwort."
msgid "To watch this video you need a subscription and login credentials. The current credentials produced an authentication error. Please check username and password in addon settings."
msgstr "Für dieses Video muss ein Abo abgeschlossen und entsprechende Login-Daten hinterlegt werden. Mit den aktuellen Login-Daten gab es einen Fehler bei der Authentifizierung. Bitte überprüfe Benutzername und Passwort in den Addon-Einstellungen."

msgctxt "#30006"
msgid "Error verifying subscription."
Expand Down
2 changes: 1 addition & 1 deletion resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ msgid "CURRENTLY RUNNING"
msgstr ""

msgctxt "#30005"
msgid "Error authenticating. Please check username and password."
msgid "To watch this video you need a subscription and login credentials. The current credentials produced an authentication error. Please check username and password in addon settings."
msgstr ""

msgctxt "#30006"
Expand Down

0 comments on commit a61186d

Please sign in to comment.