From 020a837a6a8f01aa13206bc8142f4aede07c42ae Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Thu, 28 Jul 2022 20:18:39 +0200 Subject: [PATCH] fix tag parsing of ogg files --- music_assistant/helpers/tags.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/music_assistant/helpers/tags.py b/music_assistant/helpers/tags.py index 3dbdfda1..5b5b6429 100644 --- a/music_assistant/helpers/tags.py +++ b/music_assistant/helpers/tags.py @@ -174,11 +174,12 @@ class AudioTags: has_cover_image = any( x for x in raw["streams"] if x["codec_name"] in ("mjpeg", "png") ) - # convert all tag-keys to lowercase without spaces - tags = { - key.lower().replace(" ", "").replace("_", ""): value - for key, value in raw["format"].get("tags", {}).items() - } + # convert all tag-keys (gathered from all streams) to lowercase without spaces + tags = {} + for stream in raw["streams"] + [raw["format"]]: + for key, value in stream.get("tags", {}).items(): + key = key.lower().replace(" ", "").replace("_", "") + tags[key] = value return AudioTags( raw=raw, -- 2.34.1