Skip to content

Commit

Permalink
header on license requests (fix #118) non-matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
s0faking committed Jan 30, 2022
1 parent 0e47ea4 commit 8222472
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.orftvthek" name="ORF TVthek" version="0.12.3-1" provider-name="sofaking">
<addon id="plugin.video.orftvthek" name="ORF TVthek" version="0.12.4" provider-name="sofaking">
<requires>
<import addon="xbmc.python" version="2.26.0"/>
<import addon="script.module.future" version="0.17.1"/>
Expand All @@ -26,8 +26,8 @@
<icon>resources/icon.png</icon>
<fanart>resources/fanart.jpg</fanart>
</assets>
<news>v0.12.3-1 (21/10/2021)
[fix] restart fix for non matrix
<news>v0.12.4 (30/01/2022)
[fix] fixed drm content (license server error 500)
</news>
</extension>
</addon>
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* 0.12.4
- added header to drm license server request (fixes error 500 for drm content)

* 0.12.3-1
- bugfix livestream restart (kodi <19 only)
- removed quality setting
Expand Down
8 changes: 4 additions & 4 deletions resources/lib/Addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def run():
if is_helper.check_inputstream():
link = unqoute_url(link)
debugLog("Restart Source Link: %s" % link)
headers = "User-Agent=%s" % Settings.userAgent()
headers = "User-Agent=%s&Content-Type=text/xml" % Settings.userAgent()
if params.get('lic_url'):
lic_url = unqoute_url(params.get('lic_url'))
debugLog("Playing DRM protected Restart Stream")
Expand All @@ -216,7 +216,7 @@ def run():
play_item.setProperty('inputstream', is_helper.inputstream_addon)
play_item.setProperty('inputstream.adaptive.manifest_type', input_stream_protocol)
play_item.setProperty('inputstream.adaptive.license_type', input_stream_drm_version)
play_item.setProperty('inputstream.adaptive.license_key', lic_url + '||R{SSM}|')
play_item.setProperty('inputstream.adaptive.license_key', lic_url + '|' + headers + '|R{SSM}|')
else:
streaming_url, play_item = scraper.liveStreamRestart(link, 'hls')
debugLog("Playing Non-DRM protected Restart Stream")
Expand Down Expand Up @@ -244,7 +244,7 @@ def run():
import inputstreamhelper
stream_url = unqoute_url(params.get('link'))
lic_url = unqoute_url(params.get('lic_url'))
headers = "User-Agent=%s" % Settings.userAgent()
headers = "User-Agent=%s&Content-Type=text/xml" % Settings.userAgent()
is_helper = inputstreamhelper.Helper(input_stream_protocol, drm=input_stream_drm_version)
if is_helper.check_inputstream():
debugLog("Video Url: %s" % stream_url)
Expand All @@ -256,7 +256,7 @@ def run():
play_item.setProperty('inputstreamaddon', is_helper.inputstream_addon)
play_item.setProperty('inputstream.adaptive.manifest_type', input_stream_protocol)
play_item.setProperty('inputstream.adaptive.license_type', input_stream_drm_version)
play_item.setProperty('inputstream.adaptive.license_key', lic_url + '||R{SSM}|')
play_item.setProperty('inputstream.adaptive.license_key', lic_url + '|' + headers + '|R{SSM}|')
xbmcplugin.setResolvedUrl(pluginhandle, True, listitem=play_item)
listCallback(False, pluginhandle)
else:
Expand Down

0 comments on commit 8222472

Please sign in to comment.