feat(dl): add --cdm to pin one CDM device for a run

Overrides the cdm config mapping (and its quality/DRM sub-entries) for the whole run; the REST API cdm field now flows through the same param.
This commit is contained in:
imSp4rky
2026-08-24 16:37:48 -06:00
parent 8c43250c9b
commit e804d09f0a
7 changed files with 21 additions and 6 deletions
+1 -4
View File
@@ -440,6 +440,7 @@ def perform_download(
"no_proxy": params.get("no_proxy", False),
"no_proxy_download": params.get("no_proxy_download", False),
"profile": params.get("profile"),
"cdm_name": params.get("cdm"),
"repack": params.get("repack", False),
"tag": params.get("tag"),
"tmdb_id": params.get("tmdb_id"),
@@ -484,10 +485,6 @@ def perform_download(
daily=params.get("daily", False),
output_dir=Path(params["output_dir"]) if params.get("output_dir") else None,
)
# Per-request CDM override (a device name in the WVDs dir); get_cdm() takes it first.
if params.get("cdm"):
dl_instance.cdm_override = params["cdm"]
# Per-request credential ("user:pass"); feed it into the map get_credentials() reads so a
# client can authenticate without anything being persisted to disk. Without a profile,
# get_credentials() falls back to "default", so store it there too rather than dropping it