From: Sergey M․ Date: Sun, 6 Sep 2020 04:19:53 +0000 (+0700) Subject: [utils] Recognize wav mimetype (closes #26463) X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=1d9bf655e68c873dc1f04739640046c43a1443d5;p=youtube-dl [utils] Recognize wav mimetype (closes #26463) --- diff --git a/test/test_utils.py b/test/test_utils.py index 0896f4150..962fd8d75 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -803,6 +803,8 @@ class TestUtil(unittest.TestCase): self.assertEqual(mimetype2ext('text/vtt'), 'vtt') self.assertEqual(mimetype2ext('text/vtt;charset=utf-8'), 'vtt') self.assertEqual(mimetype2ext('text/html; charset=utf-8'), 'html') + self.assertEqual(mimetype2ext('audio/x-wav'), 'wav') + self.assertEqual(mimetype2ext('audio/x-wav;codec=pcm'), 'wav') def test_month_by_name(self): self.assertEqual(month_by_name(None), None) diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index d1eca3760..01d9c0362 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -4198,6 +4198,7 @@ def mimetype2ext(mt): 'vnd.ms-sstr+xml': 'ism', 'quicktime': 'mov', 'mp2t': 'ts', + 'x-wav': 'wav', }.get(res, res)