fix: docker下minetypes无法判断m4a

This commit is contained in:
hui 2024-09-03 15:54:44 +08:00 committed by 涵曦
parent 406e09922c
commit 5bf62c4b1a

View File

@ -191,10 +191,7 @@ def is_mp3(url):
def is_m4a(url): def is_m4a(url):
mt = mimetypes.guess_type(url) return url.endswith(".m4a")
if mt and mt[0] == "audio/m4a":
return True
return False
async def _get_web_music_duration(session, url, start=0, end=500): async def _get_web_music_duration(session, url, start=0, end=500):