Fix: ignore thumbnail stream for tags parsing
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Tue, 25 Feb 2025 22:36:20 +0000 (23:36 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Tue, 25 Feb 2025 22:36:20 +0000 (23:36 +0100)
music_assistant/helpers/tags.py

index f5f0fe640a559aa2aec69ecdb4aeaec172aea481..06c8bcb5108680e1c182b90502213f8a86f4b63d 100644 (file)
@@ -398,6 +398,8 @@ class AudioTags:
         # append any tags found in streams (but don't overwrite format tags)
         tags = {}
         for stream in [raw["format"]] + raw["streams"]:
+            if stream.get("codec_type") == "video":
+                continue
             for key, value in stream.get("tags", {}).items():
                 alt_key = key.lower().replace(" ", "").replace("_", "").replace("-", "")
                 if alt_key in tags: