From 4c05fb675b92b228cd3dc872ff68da996ef424cd Mon Sep 17 00:00:00 2001 From: David McClosky Date: Fri, 23 Aug 2024 03:05:12 -0400 Subject: [PATCH] Guard against eyed3 returning None (#1599) --- music_assistant/server/helpers/tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.34.1