projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be6217b
)
[utils] Add audio/mpeg to mimetype2ext()
author
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 9 Jun 2016 04:58:24 +0000
(12:58 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 9 Jun 2016 04:58:24 +0000
(12:58 +0800)
Used in WDR live radios (#6147)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 89234b39df9cdfe3edbce0420fee5ec5b67c4575..229de4b39a0ee6408277fcf1f999b53c1d78ee78 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-2020,6
+2020,9
@@
def mimetype2ext(mt):
ext = {
'audio/mp4': 'm4a',
+ # Per RFC 3003, audio/mpeg can be .mp1, .mp2 or .mp3. Here use .mp3 as
+ # it's the most popular one
+ 'audio/mpeg': 'mp3',
}.get(mt)
if ext is not None:
return ext