Fix: check for none value in mutagen tags
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 9 Mar 2025 18:43:38 +0000 (19:43 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 9 Mar 2025 18:43:38 +0000 (19:43 +0100)
music_assistant/helpers/tags.py

index 3d86d0804ac9bb1f5e1c425110648dc24360ae20..7d8d23542e1852ffd497828e545e3b425fee4e14 100644 (file)
@@ -537,7 +537,7 @@ def parse_tags_mutagen(input_file: str) -> dict[str, Any]:
     try:
         # TODO: extend with more tags and file types!
         tags = mutagen.File(input_file)
-        if tags is None:
+        if tags is None or not tags.tags:
             return result
         tags = dict(tags.tags)
         # ID3 tags