fix(api): cast download job options with the dl click types

cast_dl_params feeds ctx.params to dl() and dl.result() as on the CLI. A string lang value now returns 400 instead of splitting into letters, and -r accepts HDR10+.
This commit is contained in:
imSp4rky
2026-11-02 20:30:40 -07:00
parent dc188b7276
commit eeff83b820
18 changed files with 284 additions and 284 deletions
@@ -305,7 +305,6 @@ class TestDownloadEnforcement:
@pytest.mark.parametrize(("params", "expected"), [({}, []), ({"server_proxy": True}, None)])
def test_perform_download_maps_stamp_to_dl_providers(self, monkeypatch, tmp_path, params, expected):
"""An unstamped or denied job hands dl an empty provider list; a stamped one loads config."""
import click
from unshackle.commands import dl as dl_module
from unshackle.core.api import download_manager as dm
@@ -316,7 +315,7 @@ class TestDownloadEnforcement:
pass
class FakeDl:
cli = click.Group("dl")
cli = dl_module.dl.cli
def __init__(self, **kwargs):
seen.update(kwargs)