fix(api): pass track-selection params to service context

Jobs ran with default [SDR] TrackRequest, breaking HYBRID/HDR downloads.
This commit is contained in:
imSp4rky
2026-07-01 23:18:53 -06:00
parent 5cdd0b3583
commit 9835f45b1b
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -31,6 +31,7 @@ unshackle/cookies/
unshackle/certs/
unshackle/WVDs/
unshackle/PRDs/
unshackle/exports/
temp/
logs/
services/
+7 -1
View File
@@ -419,14 +419,20 @@ def _perform_download(
"output_dir": Path(params["output_dir"]) if params.get("output_dir") else None,
"no_cache": params.get("no_cache", False),
"reset_cache": params.get("reset_cache", False),
# Track-selection params read by Service.__init__ via ctx.parent.params
"quality": params.get("quality", []),
"vcodec": params.get("vcodec", []),
"range_": params.get("range", [Video.Range.SDR]),
"best_available": params.get("best_available", False),
}
# Hand-built context: record parameter sources so service dl overrides
# apply to defaults but never clobber client-sent values.
from click.core import ParameterSource
for param_name in ctx.params:
source_key = "range" if param_name == "range_" else param_name
ctx.set_parameter_source(
param_name, ParameterSource.COMMANDLINE if param_name in params else ParameterSource.DEFAULT
param_name, ParameterSource.COMMANDLINE if source_key in params else ParameterSource.DEFAULT
)
dl_instance = dl(