aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-07-06 09:06:28 +0100
committerRemita Amine <remitamine@gmail.com>2016-07-06 09:06:28 +0100
commitb4173f1551c47f64745cb91451c46891e2aaac16 (patch)
treee705114c7d0a2ee15daf53e78f68efe1c0ed1658
parent2817b99cf2d799c54df0f393e237886bf9d1b80c (diff)
downloadyoutube-dl-b4173f1551c47f64745cb91451c46891e2aaac16.tar.xz
[utils] add mimetypes to determine manifest ext(m3u8, f4m, mpd)
-rw-r--r--youtube_dl/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index d302f39e4..36d5b6c0f 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)