[downloader:http] add MIME type and signature for .mov files (#5287)

This commit is contained in:
Mike Fährmann
2024-03-06 14:00:24 +01:00
parent db507e30c7
commit a8027745e3
2 changed files with 3 additions and 0 deletions

View File

@@ -399,6 +399,7 @@ MIME_TYPES = {
"video/webm": "webm",
"video/ogg" : "ogg",
"video/mp4" : "mp4",
"video/quicktime": "mov",
"audio/wav" : "wav",
"audio/x-wav": "wav",
@@ -441,6 +442,7 @@ SIGNATURE_CHECKS = {
"psd" : lambda s: s[0:4] == b"8BPS",
"mp4" : lambda s: (s[4:8] == b"ftyp" and s[8:11] in (
b"mp4", b"avc", b"iso", b"M4V")),
"mov" : lambda s: s[4:12] == b"ftypqt ",
"webm": lambda s: s[0:4] == b"\x1A\x45\xDF\xA3",
"ogg" : lambda s: s[0:4] == b"OggS",
"wav" : lambda s: (s[0:4] == b"RIFF" and

View File

@@ -304,6 +304,7 @@ SAMPLES = {
("mp4" , b"????ftypavc1"),
("mp4" , b"????ftypiso3"),
("mp4" , b"????ftypM4V"),
("mov" , b"????ftypqt "),
("webm", b"\x1A\x45\xDF\xA3"),
("ogg" , b"OggS"),
("wav" , b"RIFF????WAVE"),