Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Add inputstreamhelper (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaminister authored Nov 12, 2020
1 parent 909ab94 commit 385c0b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<requires>
<import addon="xbmc.python" version="2.26.0"/>
<import addon="script.module.dateutil" version="2.6.0"/>
<import addon="script.module.inputstreamhelper" version="0.5.1"/>
<import addon="script.module.pysocks" version="1.6.8" optional="true"/>
<import addon="script.module.requests" version="2.22.0"/>
<import addon="script.module.routing" version="0.2.0"/>
Expand Down
9 changes: 6 additions & 3 deletions resources/lib/kodiutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,12 @@ def play(stream, stream_type=STREAM_HLS, license_key=None, title=None, art_dict=
elif stream_type == STREAM_DASH:
play_item.setProperty('inputstream.adaptive.manifest_type', 'mpd')
play_item.setMimeType('application/dash+xml')
if license_key:
play_item.setProperty('inputstream.adaptive.license_type', 'com.widevine.alpha')
play_item.setProperty('inputstream.adaptive.license_key', license_key)
if license_key is not None:
import inputstreamhelper
is_helper = inputstreamhelper.Helper('mpd', drm='com.widevine.alpha')
if is_helper.check_inputstream():
play_item.setProperty('inputstream.adaptive.license_type', 'com.widevine.alpha')
play_item.setProperty('inputstream.adaptive.license_key', license_key)

play_item.setContentLookup(False)

Expand Down

0 comments on commit 385c0b0

Please sign in to comment.