Skip to content

Commit d005956

Browse files
inputstream_cdm_path > ia_cdm_path
1 parent fb5dbc9 commit d005956

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/inputstreamhelper.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ def _cdm_path(self):
9999

100100
return cdm_path
101101

102-
def _inputstream_cdm_path(self):
102+
def _ia_cdm_path(self):
103+
"""Return the specified CDM path for inputstream.adaptive."""
103104
addon = xbmcaddon.Addon('inputstream.adaptive')
104105
cdm_path = xbmc.translatePath(addon.getSetting('DECRYPTERPATH'))
105106
if not xbmcvfs.exists(cdm_path):
@@ -153,10 +154,10 @@ def _has_widevine_cdm(self):
153154
if xbmc.getCondVisibility('system.platform.android'): # widevine is built in on android
154155
return True
155156
else:
156-
for filename in os.listdir(self._inputstream_cdm_path()):
157+
for filename in os.listdir(self._ia_cdm_path()):
157158
if 'widevine' in filename and filename.endswith(config.CDM_EXTENSIONS):
158159
self._log(
159-
'Found Widevine binary at {0}'.format(os.path.join(self._inputstream_cdm_path(), filename)))
160+
'Found Widevine binary at {0}'.format(os.path.join(self._ia_cdm_path(), filename)))
160161
return True
161162

162163
self._log('Widevine is not installed.')
@@ -419,7 +420,7 @@ def _install_cdm(self):
419420
for cdm_file in os.listdir(self._cdm_path()):
420421
if cdm_file.endswith(config.CDM_EXTENSIONS):
421422
cdm_path_addon = os.path.join(self._cdm_path(), cdm_file)
422-
cdm_path_inputstream = os.path.join(self._inputstream_cdm_path(), cdm_file)
423+
cdm_path_inputstream = os.path.join(self._ia_cdm_path(), cdm_file)
423424
if self._os == 'Windows': # don't symlink on Windows
424425
shutil.copyfile(cdm_path_addon, cdm_path_inputstream)
425426
else:

0 commit comments

Comments
 (0)