Skip to content

Commit

Permalink
Merge pull request #8 from matthuisman/update_wv
Browse files Browse the repository at this point in the history
remove usage of slyguy drm base_url
  • Loading branch information
andybotting authored Mar 2, 2024
2 parents 66ecd7c + ce937ea commit e362a06
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/drmhelper/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class DRMHelper(object):
"""DRM Helper"""
def __init__(self):
self.addon = None
self.wvcdm_download_base_url = None
self.wvcdm_download_data = None

def _get_system(self):
Expand Down Expand Up @@ -241,7 +240,6 @@ def _lookup_mjh_plat(self):
def _set_wvcdm_current_ver_data(self):
data = requests.get(config.CDM_CURRENT_VERSION_URL).text
json_data = json.loads(data).get('widevine')
self.wvcdm_download_base_url = json_data.get('base_url')
plat = self._lookup_mjh_plat()
self.wvcdm_download_data = json_data['platforms'].get(plat)

Expand Down Expand Up @@ -392,9 +390,8 @@ def _get_wvcdm(self):
plat = self._get_platform()
self._set_wvcdm_current_ver_data()

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

if not os.path.isdir(cdm_path):
Expand Down

0 comments on commit e362a06

Please sign in to comment.