commit 765ac263dbf17442f41715a1cfce13fc61a4b315
parent a4e4d7dfcd03598c8b0924d4973b84ad30bc944e
Author: Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Date: Sat, 20 Feb 2016 19:55:10 +0100
[utils] mimetype2ext: return 'm4a' for 'audio/mp4' (fixes #8620)
The youtube extractor was using 'mp4' for them, therefore filters like 'bestaudio[ext=m4a]' stopped working (94278f720272c5ad2cd5900f59f8e71f31d46633 broke it).
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
@@ -1836,6 +1836,12 @@ def error_to_compat_str(err):
def mimetype2ext(mt):
+ ext = {
+ 'audio/mp4': 'm4a',
+ }.get(mt)
+ if ext is not None:
+ return ext
+
_, _, res = mt.rpartition('/')
return {