diff --git a/lib/inputstreamhelper/config.py b/lib/inputstreamhelper/config.py
index 48ef8a07..cfda4fa7 100644
--- a/lib/inputstreamhelper/config.py
+++ b/lib/inputstreamhelper/config.py
@@ -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'
diff --git a/lib/inputstreamhelper/utils.py b/lib/inputstreamhelper/utils.py
index c9174284..1fc4d95d 100644
--- a/lib/inputstreamhelper/utils.py
+++ b/lib/inputstreamhelper/utils.py
@@ -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
diff --git a/resources/settings.xml b/resources/settings.xml
index c5a30a54..9ecc13d2 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -77,7 +77,7 @@
false
- ![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]
+ ![System.Platform.Android|System.Platform.WebOS]
@@ -94,7 +94,7 @@
- ![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]
+ ![System.Platform.Android|System.Platform.WebOS]
@@ -111,7 +111,7 @@
- ![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]
+ ![System.Platform.Android|System.Platform.WebOS]
@@ -134,7 +134,7 @@
- ![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]
+ ![System.Platform.Android|System.Platform.WebOS]
@@ -153,7 +153,7 @@
- ![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]
+ ![System.Platform.Android|System.Platform.WebOS]
@@ -172,7 +172,7 @@
- ![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]
+ ![System.Platform.Android|System.Platform.WebOS]
@@ -215,7 +215,7 @@
- ![System.Platform.Android|System.Platform.webOS|String.StartsWith(System.BuildVersion,17)]
+ ![System.Platform.Android|System.Platform.WebOS]
diff --git a/tests/test_ishelper_webos_arm.py b/tests/test_ishelper_webos_arm.py
new file mode 100644
index 00000000..911d2ea9
--- /dev/null
+++ b/tests/test_ishelper_webos_arm.py
@@ -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()
diff --git a/tests/xbmc.py b/tests/xbmc.py
index 061a1d9d..caa4713e 100644
--- a/tests/xbmc.py
+++ b/tests/xbmc.py
@@ -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)',
}
@@ -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