A feature-rich command-line audio/video downloader
[utils] add mimetypes to determine manifest ext(m3u8, f4m, mpd)
Remita Amineb4173f1551c4
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.pyindex d302f39e47..36d5b6c0f2 100644--- a/youtube_dl/utils.py+++ b/youtube_dl/utils.py@@ -2097,6 +2097,7 @@ def mimetype2ext(mt):return ext_, _, res = mt.rpartition('/')+ res = res.lower()return {'3gpp': '3gp',@@ -2108,6 +2109,12 @@ def mimetype2ext(mt):'x-flv': 'flv','x-mp4-fragmented': 'mp4','x-ms-wmv': 'wmv',+ 'mpegurl': 'm3u8',+ 'x-mpegurl': 'm3u8',+ 'vnd.apple.mpegurl': 'm3u8',+ 'dash+xml': 'mpd',+ 'f4m': 'f4m',+ 'f4m+xml': 'f4m',}.get(res, res)