From: Marcel van der Veldt Date: Thu, 28 Jul 2022 18:18:39 +0000 (+0200) Subject: fix tag parsing of ogg files X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=020a837a6a8f01aa13206bc8142f4aede07c42ae;p=music-assistant-server.git fix tag parsing of ogg files --- 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,