diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2016-02-20 19:55:10 +0100 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2016-02-20 19:55:10 +0100 |
commit | 765ac263dbf17442f41715a1cfce13fc61a4b315 (patch) | |
tree | dcba47f9a40d9059bc49b1a382045efd6f77b7cf | |
parent | a4e4d7dfcd03598c8b0924d4973b84ad30bc944e (diff) |
[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).
-rw-r--r-- | youtube_dl/utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 7ce661b09..a2c6780ca 100644 --- 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 { |