first commit

This commit is contained in:
Tomas Dvorak
2026-04-13 17:46:58 +02:00
commit 6e8fedf534
234 changed files with 53808 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import mimetypes
def guess_mime_type(filename: str):
"""
Guess the mime type of a file.
"""
type = mimetypes.guess_type(filename)[0]
if type is None:
ext = filename.rsplit(".", maxsplit=1)[-1]
return f"audio/{ext}"
return type