|
11 | 11 | set_setting, set_setting_bool, textviewer, translate_path, yesno_dialog) |
12 | 12 | from .utils import arch, http_download, remove_tree, run_cmd, store, system_os, temp_path, unzip |
13 | 13 | from .widevine.arm import install_widevine_arm, unmount |
14 | | -from .widevine.widevine import (backup_path, has_widevinecdm, ia_cdm_path, install_cdm_from_backup, latest_widevine_version, |
15 | | - load_widevine_config, missing_widevine_libs, widevine_config_path, widevine_eula, widevinecdm_path) |
| 14 | +from .widevine.widevine import (backup_path, has_widevinecdm, ia_cdm_path, install_cdm_from_backup, latest_available_widevine_from_repo, |
| 15 | + latest_widevine_version, load_widevine_config, missing_widevine_libs, widevine_config_path, widevine_eula, widevinecdm_path) |
16 | 16 | from .unicodes import compat_path |
17 | 17 |
|
18 | 18 | # NOTE: Work around issue caused by platform still using os.popen() |
@@ -171,14 +171,11 @@ def _supports_widevine(): |
171 | 171 | @staticmethod |
172 | 172 | def _install_widevine_x86(bpath): |
173 | 173 | """Install Widevine CDM on x86 based architectures.""" |
174 | | - cdm_version = latest_widevine_version() |
| 174 | + cdm = latest_available_widevine_from_repo() |
| 175 | + cdm_version = cdm.get('version') |
175 | 176 |
|
176 | 177 | if not store('download_path'): |
177 | | - cdm_os = config.WIDEVINE_OS_MAP[system_os()] |
178 | | - cdm_arch = config.WIDEVINE_ARCH_MAP_X86[arch()] |
179 | | - url = config.WIDEVINE_DOWNLOAD_URL.format(version=cdm_version, os=cdm_os, arch=cdm_arch) |
180 | | - |
181 | | - downloaded = http_download(url) |
| 178 | + downloaded = http_download(cdm.get('url')) |
182 | 179 | else: |
183 | 180 | downloaded = True |
184 | 181 |
|
@@ -279,13 +276,13 @@ def _update_widevine(self): |
279 | 276 | elif 'x86' in arch(): |
280 | 277 | component = 'Widevine CDM' |
281 | 278 | current_version = wv_config['version'] |
| 279 | + latest_version = latest_available_widevine_from_repo().get('version') |
282 | 280 | else: |
283 | 281 | component = 'Chrome OS' |
284 | 282 | current_version = wv_config['version'] |
285 | | - |
286 | | - latest_version = latest_widevine_version() |
| 283 | + latest_version = latest_widevine_version() |
287 | 284 | if not latest_version: |
288 | | - log(3, 'Updating widevine failed. Could not determine latest version.') |
| 285 | + log(3, 'Updating Widevine CDM failed. Could not determine latest version.') |
289 | 286 | return |
290 | 287 |
|
291 | 288 | log(0, 'Latest {component} version is {version}', component=component, version=latest_version) |
|
0 commit comments