Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/inputstreamhelper/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
'Windows': '18.0',
'Linux': '18.0',
'Darwin': '18.0',
'webOS': '22.0'
'webOS': '21.0'
}

WIDEVINE_VERSIONS_URL = 'https://dl.google.com/widevine-cdm/versions.txt'
Expand Down
4 changes: 2 additions & 2 deletions lib/inputstreamhelper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ def system_os():
return getattr(system_os, 'cached')

from xbmc import getCondVisibility
if getCondVisibility('system.platform.android'):
if getCondVisibility('System.Platform.Android'):
sys_name = 'Android'
elif getCondVisibility('system.platform.webos'):
elif getCondVisibility('System.Platform.WebOS'):
sys_name = 'webOS'
else:
from platform import system
Expand Down
14 changes: 7 additions & 7 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<condition operator="is" setting="disabled">false</condition>
</dependency>
<dependency type="visible">
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]</condition>
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.WebOS]</condition>
</dependency>
</dependencies>
<control type="slider" format="integer">
Expand All @@ -94,7 +94,7 @@
</constraints>
<dependencies>
<dependency type="visible">
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]</condition>
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.WebOS]</condition>
</dependency>
</dependencies>
<control type="button" format="path">
Expand All @@ -111,7 +111,7 @@
</constraints>
<dependencies>
<dependency type="visible">
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]</condition>
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.WebOS]</condition>
</dependency>
</dependencies>
<control type="slider" format="integer">
Expand All @@ -134,7 +134,7 @@
</and>
</dependency>
<dependency type="visible">
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]</condition>
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.WebOS]</condition>
</dependency>
</dependencies>
<control type="button" format="action"/>
Expand All @@ -153,7 +153,7 @@
</and>
</dependency>
<dependency type="visible">
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]</condition>
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.WebOS]</condition>
</dependency>
</dependencies>
<control type="button" format="action"/>
Expand All @@ -172,7 +172,7 @@
</and>
</dependency>
<dependency type="visible">
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]</condition>
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.WebOS]</condition>
</dependency>
</dependencies>
<control type="button" format="action"/>
Expand Down Expand Up @@ -215,7 +215,7 @@
</and>
</dependency>
<dependency type="visible">
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]</condition>
<condition on="property" name="InfoBool">![System.Platform.Android|System.Platform.WebOS]</condition>
</dependency>
</dependencies>
<control type="button" format="action"/>
Expand Down
56 changes: 56 additions & 0 deletions tests/test_ishelper_webos_arm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

# pylint: disable=missing-docstring

import unittest
import platform

import inputstreamhelper
from test_utils import delete_cached, cleanup

xbmc = __import__('xbmc')
xbmcaddon = __import__('xbmcaddon')
xbmcgui = __import__('xbmcgui')
xbmcvfs = __import__('xbmcvfs')


class WebOSARMTests(unittest.TestCase):

def setUp(self):
delete_cached()
cleanup()
inputstreamhelper.system_os = lambda: 'webOS'
inputstreamhelper.widevine.widevine.system_os = lambda: 'webOS'
inputstreamhelper.widevine.repo.system_os = lambda: 'webOS'

def test_check_inputstream_mpd(self):
platform.machine = lambda: 'arm'
is_helper = inputstreamhelper.Helper('mpd', drm='com.widevine.alpha')
is_helper.remove_widevine()
is_installed = is_helper.check_inputstream()
self.assertTrue(is_installed, True)

def test_check_inputstream_hls_again(self):
platform.machine = lambda: 'armv7'
is_helper = inputstreamhelper.Helper('hls', drm='com.widevine.alpha')
is_installed = is_helper.check_inputstream()
self.assertTrue(is_installed, True)

def test_check_inputstream_rtmp(self):
platform.machine = lambda: 'armv8'
is_helper = inputstreamhelper.Helper('rtmp')
is_installed = is_helper.check_inputstream()
self.assertTrue(is_installed, True)

def test_check_inputstream_disabled(self):
platform.machine = lambda: 'arm'
is_helper = inputstreamhelper.Helper('mpd', drm='com.widevine.alpha')
is_helper.disable()
is_installed = is_helper.check_inputstream()
is_helper.enable()
self.assertTrue(is_installed, True)


if __name__ == '__main__':
unittest.main()
4 changes: 2 additions & 2 deletions tests/xbmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

INFO_LABELS = {
'Container.FolderPath': 'plugin://' + ADDON_ID + '/',
'System.BuildVersion': '18.9',
'System.BuildVersion': '21.0',
'System.OSVersionInfo': 'Linux (kernel: Linux 5.4.0-73-generic)',
}

Expand Down Expand Up @@ -228,7 +228,7 @@ def executeJSONRPC(jsonrpccommand):

def getCondVisibility(string):
"""A reimplementation of the xbmc getCondVisibility() function"""
if string in ('system.platform.android', 'system.platform.webos'):
if string in ('System.Platform.Android', 'System.Platform.WebOS'):
return False
if string.startswith('System.HasAddon'):
return True
Expand Down
Loading