Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix EULA retrieval for linux/arm64 #572

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions lib/inputstreamhelper/widevine/widevine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
"""Implements generic widevine functions used across architectures"""

from __future__ import absolute_import, division, unicode_literals

import os
from time import time

from .. import config
from ..kodiutils import (addon_profile, exists, get_setting_int, listdir, localize, log, mkdirs,
ok_dialog, open_file, set_setting, translate_path, yesno_dialog)
from ..utils import arch, cmd_exists, hardlink, http_download, parse_version, remove_tree, run_cmd, system_os
from ..kodiutils import (addon_profile, exists, get_setting_int, listdir,
localize, log, mkdirs, ok_dialog, open_file,
set_setting, translate_path, yesno_dialog)
from ..unicodes import compat_path, to_unicode
from ..utils import (arch, cmd_exists, hardlink, http_download, parse_version,
remove_tree, run_cmd, system_os)
from .arm_lacros import cdm_from_lacros, latest_lacros
from .repo import cdm_from_repo, latest_widevine_available_from_repo

Expand All @@ -37,7 +40,7 @@ def widevine_eula():
cdm_arch = config.WIDEVINE_ARCH_MAP_REPO[arch()]
else: # Grab the license from the x86 files
log(0, 'Acquiring Widevine EULA from x86 files.')
cdm_version = latest_widevine_version(eula=True)
cdm_version = '4.10.2830.0' # fine to hardcode as it's only used for the EULA
cdm_os = 'mac'
cdm_arch = 'x64'

Expand Down Expand Up @@ -156,9 +159,9 @@ def missing_widevine_libs():
return None


def latest_widevine_version(eula=False):
def latest_widevine_version():
"""Returns the latest available version of Widevine CDM/Chrome OS/Lacros Image."""
if eula or cdm_from_repo():
if cdm_from_repo():
return latest_widevine_available_from_repo().get('version')

if cdm_from_lacros():
Expand Down
Loading