Skip to content

Commit

Permalink
troubleshouting setting to ignore inputstream.adaptive (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaminister authored and dagwieers committed May 18, 2019
1 parent f86f3eb commit 0a5d23b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
4 changes: 4 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ msgctxt "#30869"
msgid "Log level"
msgstr ""

msgctxt "#30871"
msgid "Use InputStream Adaptive"
msgstr ""


### MESSAGES
msgctxt "#30951"
Expand Down
4 changes: 4 additions & 0 deletions resources/language/resource.language.nl_nl/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ msgctxt "#30069"
msgid "Log level"
msgstr "Log level"

msgctxt "#30871"
msgid "Use InputStream Adaptive"
msgstr "Gebruik InputStream Adaptive"


### MESSAGES
msgctxt "#30951"
Expand Down
Binary file added resources/lib/__init__.pyo
Binary file not shown.
13 changes: 8 additions & 5 deletions resources/lib/kodiwrappers/kodiwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,19 @@ def get_proxies(self):

return dict(http=proxy_address, https=proxy_address)

# NOTE: InputStream Adaptive is not pre-installed on Windows and in some cases users can uninstall it
def has_inputstream_adaptive_installed(self):
return xbmc.getCondVisibility('System.HasAddon("{0}")'.format('inputstream.adaptive')) == 1
def has_inputstream_adaptive(self):
if self.get_setting('useinputstreamadaptive') == 'true':
return xbmc.getCondVisibility('System.HasAddon("{0}")'.format('inputstream.adaptive')) == 1
return False

def has_credentials(self):
return bool(self.get_setting('username') and self.get_setting('password'))

def can_play_drm(self):
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion').split('.')[0])
return kodi_version > 17
if self.get_setting('useinputstreamadaptive') == 'true':
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion').split('.')[0])
return kodi_version > 17
return False

def get_userdata_path(self):
return xbmc.translatePath(self._addon.getAddonInfo('profile'))
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/vrtplayer/streamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def get_stream(self, video, retry=False, api_data=None):
drm_stream = (vudrm_token or uplynk)

# Select streaming protocol
if not drm_stream and self._kodi.has_inputstream_adaptive_installed() or drm_stream and self._can_play_drm and self._kodi.get_setting('usedrm') == 'true':
if not drm_stream and self._kodi.has_inputstream_adaptive() or drm_stream and self._can_play_drm and self._kodi.get_setting('usedrm') == 'true':
protocol = 'mpeg_dash'
elif vudrm_token:
protocol = 'hls_aes'
Expand Down
1 change: 1 addition & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
<setting label="30865" help="30866" type="action" id="refresh_favorites" action="RunPlugin(plugin://plugin.video.vrt.nu/?action=refreshfavorites)"/>
<setting label="30867" help="30868" type="action" id="clear_tokens" action="RunPlugin(plugin://plugin.video.vrt.nu/?action=clearcookies)"/>
<setting label="30869" help="30870" type="select" id="max_log_level" values="Quiet|Info|Verbose|Debug" default="Info"/>
<setting label="30871" help="30872" type="bool" id="useinputstreamadaptive" default="true"/>
</category>
</settings>

0 comments on commit 0a5d23b

Please sign in to comment.