From 808f46be5b2b27c4bb65ee34990e2ad85129c45d Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 20 Dec 2024 11:14:36 -0700 Subject: [PATCH] Adding special handling for WMA file mimetype. --- wrolpi/files/lib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrolpi/files/lib.py b/wrolpi/files/lib.py index 6ed5adde..3bef6c22 100644 --- a/wrolpi/files/lib.py +++ b/wrolpi/files/lib.py @@ -244,8 +244,10 @@ def _mimetype_suffix_map(path: Path, mimetype: str): if mimetype == 'application/x-subrip': # Fallback to old mimetype. return 'text/srt' - if mimetype == 'application/zip' and path.suffix == '.docx': + if mimetype == 'application/zip' and suffix == '.docx': return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' + if mimetype == 'video/x-ms-asf' and suffix == '.wma': + return 'audio/x-ms-wma' return mimetype