mirror of
https://git.sr.ht/~cadence/NewLeaf
synced 2024-11-25 00:47:29 +00:00
Do not extract storyboards into v/a formats
This commit is contained in:
parent
8a13868db7
commit
550b633663
@ -106,7 +106,13 @@ def extract_video(id):
|
|||||||
}
|
}
|
||||||
|
|
||||||
for format in info["formats"]:
|
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"
|
is_adaptive = format["acodec"] == "none" or format["vcodec"] == "none"
|
||||||
sense = "video" if format["vcodec"] != "none" else "audio"
|
sense = "video" if format["vcodec"] != "none" else "audio"
|
||||||
mime = sense + "/" + format["ext"]
|
mime = sense + "/" + format["ext"]
|
||||||
|
Loading…
Reference in New Issue
Block a user