From 385c0b0aec5927d22219462309d2e58fb11aa572 Mon Sep 17 00:00:00 2001 From: mediaminister <45148099+mediaminister@users.noreply.github.com> Date: Thu, 12 Nov 2020 07:13:13 +0000 Subject: [PATCH] Add inputstreamhelper (#57) --- addon.xml | 1 + resources/lib/kodiutils.py | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/addon.xml b/addon.xml index 68bbd56..b9aa704 100644 --- a/addon.xml +++ b/addon.xml @@ -3,6 +3,7 @@ + diff --git a/resources/lib/kodiutils.py b/resources/lib/kodiutils.py index 60f30a2..f9b3827 100644 --- a/resources/lib/kodiutils.py +++ b/resources/lib/kodiutils.py @@ -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)