mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-22 00:45:10 +00:00
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:
@@ -291,7 +291,7 @@ def test_validate_download_params_accepts_defaults() -> None:
|
||||
"data, fragment",
|
||||
[
|
||||
({"vcodec": "WUT"}, "Invalid vcodec"),
|
||||
({"vcodec": 123}, "vcodec must be a string or list"),
|
||||
({"vcodec": 123}, "Invalid vcodec"),
|
||||
({"acodec": "MP9"}, "Invalid acodec"),
|
||||
({"sub_format": "doc"}, "Invalid sub_format"),
|
||||
({"vbitrate": -1}, "vbitrate"),
|
||||
@@ -310,7 +310,7 @@ def test_validate_download_params_accepts_defaults() -> None:
|
||||
({"no_audio": True, "audio_only": True}, "no_audio and audio_only"),
|
||||
({"require_subs": "en"}, "require_subs must be an array"),
|
||||
({"range": "UHD"}, "Invalid range"),
|
||||
({"range": ["SDR", "UHD"]}, "Invalid range value"),
|
||||
({"range": ["SDR", "UHD"]}, "Invalid range"),
|
||||
],
|
||||
)
|
||||
def test_validate_download_params_errors(data: dict, fragment) -> None:
|
||||
|
||||
Reference in New Issue
Block a user