feat(dl): load the DRM system a cdm entry lists first

The first of the widevine / playready config keys in a cdm entry sets which device loads first and which DRM system licenses a track that offers the two. An entry that lists playready first changes from Widevine to PlayReady.
This commit is contained in:
imSp4rky
2026-10-13 12:44:11 -06:00
parent af4e6d5d47
commit 2ba442f50e
5 changed files with 34 additions and 3 deletions
+2 -1
View File
@@ -156,7 +156,8 @@ def load_full_cdm(service: str, profile: Optional[str], cdm_type: Optional[str]
drm_key = {"wv": "widevine", "widevine": "widevine", "pr": "playready", "playready": "playready"}.get(
cdm_type.lower()
)
cdm_name = lower_keys.get(drm_key or "widevine") or lower_keys.get("playready")
first = next(key for key in lower_keys if key in ("widevine", "playready"))
cdm_name = lower_keys.get(drm_key or first) or lower_keys.get("playready")
else:
cdm_name = cdm_name.get(profile) or cdm_name.get("default") or ci_get(app_config.cdm, "default")