Skip to content

Commit a8793a6

Browse files
Move cdm_path check to _has_widevine_cdm
1 parent ade53c3 commit a8793a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/inputstreamhelper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ def __init__(self, protocol, drm=None):
3131
self._inputstream_addon = config.INPUTSTREAM_PROTOCOLS[self.protocol]
3232

3333
if self.drm:
34-
if not xbmcvfs.exists(self._cdm_path()):
35-
xbmcvfs.mkdir(self._cdm_path())
3634
if self.drm not in config.DRM_SCHEMES:
3735
raise self.InputStreamException('UnsupportedDRMScheme')
3836
else:
@@ -64,6 +62,8 @@ def _inputstream_version(self):
6462
return addon.getAddonInfo('version')
6563

6664
def _has_widevine_cdm(self):
65+
if not xbmcvfs.exists(self._cdm_path()):
66+
xbmcvfs.mkdir(self._cdm_path())
6767
if xbmc.getCondVisibility('system.platform.android'): # widevine is built in on android
6868
return True
6969
else:

0 commit comments

Comments
 (0)