Skip to content

Commit e362a06

Browse files
authored
Merge pull request #8 from matthuisman/update_wv
remove usage of slyguy drm base_url
2 parents 66ecd7c + ce937ea commit e362a06

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/drmhelper/helper.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class DRMHelper(object):
2222
"""DRM Helper"""
2323
def __init__(self):
2424
self.addon = None
25-
self.wvcdm_download_base_url = None
2625
self.wvcdm_download_data = None
2726

2827
def _get_system(self):
@@ -241,7 +240,6 @@ def _lookup_mjh_plat(self):
241240
def _set_wvcdm_current_ver_data(self):
242241
data = requests.get(config.CDM_CURRENT_VERSION_URL).text
243242
json_data = json.loads(data).get('widevine')
244-
self.wvcdm_download_base_url = json_data.get('base_url')
245243
plat = self._lookup_mjh_plat()
246244
self.wvcdm_download_data = json_data['platforms'].get(plat)
247245

@@ -392,9 +390,8 @@ def _get_wvcdm(self):
392390
plat = self._get_platform()
393391
self._set_wvcdm_current_ver_data()
394392

395-
url = os.path.join(self.wvcdm_download_base_url,
396-
self.wvcdm_download_data[0].get('src'))
397-
filename = url.split('/')[-1]
393+
filename = self.wvcdm_download_data[0].get('src')
394+
url = os.path.dirname(config.CDM_CURRENT_VERSION_URL) + '/widevine/' + filename
398395
wv_cdm_fn = self._get_wvcdm_filename()
399396

400397
if not os.path.isdir(cdm_path):

0 commit comments

Comments
 (0)