From: OzGav Date: Mon, 29 Dec 2025 09:57:20 +0000 (+1000) Subject: Fix spotify podcast thumb image quality (#2885) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=05c0ddd63c3597b32c25034045f97b2789e14022;p=music-assistant-server.git Fix spotify podcast thumb image quality (#2885) * Fix Spotify podcast thumbnail image quality * Remove debug line * Simplify --- 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( [