diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 657e3e78..54750ac7 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -401,6 +401,8 @@ MIME_TYPES = { "video/webm": "webm", "video/ogg" : "ogg", "video/mp4" : "mp4", + "video/m4v" : "m4v", + "video/x-m4v": "m4v", "video/quicktime": "mov", "audio/wav" : "wav", @@ -443,7 +445,8 @@ SIGNATURE_CHECKS = { "cur" : lambda s: s[0:4] == b"\x00\x00\x02\x00", "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")), + b"mp4", b"avc", b"iso")), + "m4v" : lambda s: s[4:11] == b"ftypM4V", "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", diff --git a/test/test_downloader.py b/test/test_downloader.py index 8027af50..f63b68a2 100644 --- a/test/test_downloader.py +++ b/test/test_downloader.py @@ -303,7 +303,7 @@ SAMPLES = { ("mp4" , b"????ftypmp4"), ("mp4" , b"????ftypavc1"), ("mp4" , b"????ftypiso3"), - ("mp4" , b"????ftypM4V"), + ("m4v" , b"????ftypM4V"), ("mov" , b"????ftypqt "), ("webm", b"\x1A\x45\xDF\xA3"), ("ogg" , b"OggS"),