From 05c0ddd63c3597b32c25034045f97b2789e14022 Mon Sep 17 00:00:00 2001 From: OzGav Date: Mon, 29 Dec 2025 19:57:20 +1000 Subject: [PATCH] Fix spotify podcast thumb image quality (#2885) * Fix Spotify podcast thumbnail image quality * Remove debug line * Simplify --- music_assistant/providers/spotify/parsers.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/music_assistant/providers/spotify/parsers.py b/music_assistant/providers/spotify/parsers.py index 557bde94..e41b47a2 100644 --- a/music_assistant/providers/spotify/parsers.py +++ b/music_assistant/providers/spotify/parsers.py @@ -45,9 +45,11 @@ def parse_images( if not filtered_images: return UniqueList([]) - # Spotify orders images from largest to smallest (640x640, 300x300, 64x64) - # Select the largest (highest quality) image - the first one - best_image = filtered_images[0] + # Spotify images come in various sizes (typically 640x640, 300x300, 64x64) + # Find the largest image available + best_image = max( + filtered_images, key=lambda img: img.get("height", 0), default=filtered_images[0] + ) return UniqueList( [ -- 2.34.1