Pārlūkot izejas kodu

[utils] Add audio/mpeg to mimetype2ext()

Used in WDR live radios (#6147)
Yen Chi Hsuan 9 gadi atpakaļ
vecāks
revīzija
6c33d24b46
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      youtube_dl/utils.py

+ 3 - 0
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