From: David McClosky Date: Fri, 23 Aug 2024 07:05:12 +0000 (-0400) Subject: Guard against eyed3 returning None (#1599) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=4c05fb675b92b228cd3dc872ff68da996ef424cd;p=music-assistant-server.git Guard against eyed3 returning None (#1599) --- diff --git a/music_assistant/server/helpers/tags.py b/music_assistant/server/helpers/tags.py index d17b55f6..627546d5 100644 --- a/music_assistant/server/helpers/tags.py +++ b/music_assistant/server/helpers/tags.py @@ -447,7 +447,7 @@ async def parse_tags( # this is actually a bug in ffmpeg/ffprobe which does not expose this tag # so we use this as alternative approach for mp3 files audiofile = await asyncio.to_thread(eyed3.load, file_path) - if audiofile.tag is not None: + if audiofile is not None and audiofile.tag is not None: for uf_id in audiofile.tag.unique_file_ids: if uf_id.owner_id == b"http://musicbrainz.org" and uf_id.uniq_id: tags.tags["musicbrainzrecordingid"] = uf_id.uniq_id.decode()