Skip to content

Commit 9ff4623

Browse files
Improve logic
1 parent 2dfdb58 commit 9ff4623

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

lib/inputstreamhelper.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,9 @@ def _install_widevine_cdm(self):
211211
if downloaded:
212212
if self._unzip_widevine_cdm(download_path):
213213
dialog.ok(self._language(30001), self._language(30003))
214-
else:
215-
return False
216-
else:
217-
return False
214+
return True
215+
216+
return False
218217

219218
def _unzip_widevine_cdm(self, zip_path):
220219
busy_dialog = xbmcgui.DialogBusy()
@@ -268,12 +267,11 @@ def check_inputstream(self):
268267
ok = dialog.yesno(self._language(30001),
269268
self._language(30009).format(self._inputstream_addon, self._inputstream_addon))
270269
if ok:
271-
if not self._enable_inputstream():
272-
return False
270+
self._enable_inputstream()
273271
else:
274272
return False
275-
elif self.protocol == 'hls':
276-
return self._supports_hls()
277-
else:
278-
self._log('{0} is installed and enabled.'.format(self._inputstream_addon))
279-
return self._check_for_drm()
273+
if self.protocol == 'hls' and not self._supports_hls():
274+
return False
275+
276+
self._log('{0} is installed and enabled.'.format(self._inputstream_addon))
277+
return self._check_for_drm()

0 commit comments

Comments
 (0)