mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
[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 (94278f7202
broke it).
This commit is contained in:
parent
a4e4d7dfcd
commit
765ac263db
|
@ -1836,6 +1836,12 @@ def error_to_compat_str(err):
|
||||||
|
|
||||||
|
|
||||||
def mimetype2ext(mt):
|
def mimetype2ext(mt):
|
||||||
|
ext = {
|
||||||
|
'audio/mp4': 'm4a',
|
||||||
|
}.get(mt)
|
||||||
|
if ext is not None:
|
||||||
|
return ext
|
||||||
|
|
||||||
_, _, res = mt.rpartition('/')
|
_, _, res = mt.rpartition('/')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue