Fix #1093: mimetype detection issue that broke transcoding on certain tracks

This commit is contained in:
Agate 2020-05-04 13:52:25 +02:00
parent c1e2f16de1
commit 85bc8d93e8
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14
4 changed files with 34 additions and 6 deletions

View file

@ -22,6 +22,8 @@ def guess_mimetype(f):
mt, _ = mimetypes.guess_type(f.name)
if mt:
t = mt
else:
t = EXTENSION_TO_MIMETYPE.get(f.name.split(".")[-1])
return t