refactor(dl): check dl options once in a run plan shared by the CLI and the REST download job

This commit is contained in:
imSp4rky
2026-11-25 16:16:43 -07:00
parent 7838226590
commit 4d3df8e74f
23 changed files with 501 additions and 524 deletions
+5 -5
View File
@@ -301,17 +301,17 @@ def test_validate_download_params_accepts_defaults() -> None:
({"vbitrate": -1}, "vbitrate"),
({"abitrate": "no"}, "abitrate"),
({"vbitrate_range": "no-dash-but-letters"}, "MIN-MAX"),
({"vbitrate": 5000, "vbitrate_range": "1-2"}, "vbitrate and vbitrate_range"),
({"abitrate": 128, "abitrate_range": "96-256"}, "abitrate and abitrate_range"),
({"vbitrate": 5000, "vbitrate_range": "1-2"}, "--vbitrate and --vbitrate-range"),
({"abitrate": 128, "abitrate_range": "96-256"}, "--abitrate and --abitrate-range"),
({"abitrate_range": "1-2-3"}, "MIN-MAX"),
({"quality": "4k"}, "Invalid quality"),
({"quality": [0]}, "above 0"),
({"channels": -3}, "channels"),
({"workers": 0}, "workers"),
({"downloads": 0}, "downloads"),
({"video_only": True, "audio_only": True}, "exclusive"),
({"no_subs": True, "subs_only": True}, "no_subs and subs_only"),
({"no_audio": True, "audio_only": True}, "no_audio and audio_only"),
({"video_only": True, "audio_only": True}, None),
({"no_subs": True, "subs_only": True}, "--subs-only cannot be used with --no-subs"),
({"no_audio": True, "audio_only": True}, "--audio-only cannot be used with --no-audio"),
({"require_subs": "en"}, "require_subs must be an array"),
({"range": "UHD"}, "Invalid range"),
({"range": ["SDR", "UHD"]}, "Invalid range"),