Merge branch 'dev' into chore/code-hygiene
This commit is contained in:
commit
aee1bdc85d
4 changed files with 38 additions and 11 deletions
|
|
@ -62,7 +62,12 @@ def normalize(spec: dict) -> dict:
|
|||
if s["mode"] not in ("av", "v", "a"):
|
||||
s["mode"] = "av"
|
||||
if s["max_height"] is not None:
|
||||
s["max_height"] = int(s["max_height"])
|
||||
# A malformed max_height (non-numeric inline spec / stored profile) falls back to "best"
|
||||
# rather than raising an unhandled 500 at enqueue.
|
||||
try:
|
||||
s["max_height"] = int(s["max_height"])
|
||||
except (TypeError, ValueError):
|
||||
s["max_height"] = None
|
||||
for b in ("embed_subs", "embed_chapters", "embed_thumbnail", "sponsorblock"):
|
||||
s[b] = bool(s[b])
|
||||
# Audio-only files can't embed subtitles/thumbnails as video; keep the flags meaningful.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue