mirror of
https://git.sr.ht/~cadence/NewLeaf
synced 2025-11-19 12:46:31 +00:00
Do not extract storyboards into v/a formats
This commit is contained in:
parent
8a13868db7
commit
550b633663
1 changed files with 7 additions and 1 deletions
|
|
@ -106,7 +106,13 @@ def extract_video(id):
|
|||
}
|
||||
|
||||
for format in info["formats"]:
|
||||
# Adaptive formats have either audio or video, format streams have both
|
||||
# Storyboard images are now included in formats, we don't want them.
|
||||
# Storyboards have neither audio nor video, so detect them that way.
|
||||
# They could also be detected with ("storyboard" in format_note), or with (protocol == "mhtml").
|
||||
if format["acodec"] == "none" and format["vcodec"] == "none":
|
||||
continue
|
||||
|
||||
# Adaptive formats have either audio or video, format streams have both, storyboard images have neither.
|
||||
is_adaptive = format["acodec"] == "none" or format["vcodec"] == "none"
|
||||
sense = "video" if format["vcodec"] != "none" else "audio"
|
||||
mime = sense + "/" + format["ext"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue