Skip to content

Commit 71d3945

Browse files
committed
Add Chrome OS about test
1 parent 60e6c1a commit 71d3945

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

lib/inputstreamhelper/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,6 @@ def check_inputstream(self):
435435
if get_setting_bool('disabled', False): # blindly return True if helper has been disabled
436436
log(3, 'InputStreamHelper is disabled in its settings.xml.')
437437
return True
438-
if self.drm == 'widevine' and not self._supports_widevine():
439-
return False
440438
if not self._has_inputstream():
441439
# Try to install InputStream add-on
442440
if not self._install_inputstream():
@@ -448,6 +446,8 @@ def check_inputstream(self):
448446
return False
449447
self._enable_inputstream()
450448
log(0, '{addon} {version} is installed and enabled.', addon=self.inputstream_addon, version=self._inputstream_version())
449+
if self.drm == 'widevine' and not self._supports_widevine():
450+
return False
451451

452452
if self.protocol == 'hls' and not self._supports_hls():
453453
ok_dialog(localize(30004), # HLS Minimum version is needed

tests/test_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import os
77
import unittest
8+
9+
import inputstreamhelper
810
import default
911

1012
xbmc = __import__('xbmc')
@@ -27,6 +29,15 @@ def test_widevine_remove(self):
2729
def test_about(self):
2830
default.run(['default.py', 'info'])
2931

32+
def test_about_chromeos(self):
33+
inputstreamhelper.system_os = lambda: 'Linux'
34+
inputstreamhelper.widevine.widevine.system_os = lambda: 'Linux'
35+
inputstreamhelper.widevine.repo.system_os = lambda: 'Linux'
36+
inputstreamhelper.arch = lambda: 'arm64'
37+
inputstreamhelper.widevine.widevine.arch = lambda: 'arm64'
38+
inputstreamhelper.widevine.repo.arch = lambda: 'arm64'
39+
default.run(['default.py', 'info'])
40+
3041
def test_check_inputstream(self):
3142
if os.path.exists('tests/cdm/widevine_config.json'):
3243
os.remove('tests/cdm/widevine_config.json')

0 commit comments

Comments
 (0)