From de8f7585967b8e2e79d7c6e4cffd0b7d8de626bf Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Wed, 25 Mar 2026 17:37:59 -0700 Subject: [PATCH] Fix watchlist artist image not loading for Deezer source The watchlist add code called fallback.get_artist() which doesn't exist on the Deezer client (only get_artist_info). The AttributeError was silently caught, leaving image_url as None. Now uses get_artist_info() and falls back to a direct Deezer API call for picture_xl when the Spotify-compatible format doesn't have images. --- web_server.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/web_server.py b/web_server.py index c60a2f04..76d367d1 100644 --- a/web_server.py +++ b/web_server.py @@ -33388,10 +33388,20 @@ def add_to_watchlist(): # For numeric IDs, fetch image from the configured fallback source try: if fallback_source == 'deezer': - # Deezer artists have direct image URLs + # Deezer artists have direct image URLs via picture_xl fallback = _get_metadata_fallback_client() - artist_info = fallback.get_artist(artist_id) + artist_info = fallback.get_artist_info(str(artist_id)) if hasattr(fallback, 'get_artist_info') else None image_url = artist_info.get('images', [{}])[0].get('url') if artist_info and artist_info.get('images') else None + # Fallback: try Deezer API directly for picture + if not image_url: + try: + import requests as req + resp = req.get(f'https://api.deezer.com/artist/{artist_id}', timeout=5) + if resp.ok: + dz = resp.json() + image_url = dz.get('picture_xl') or dz.get('picture_big') or dz.get('picture_medium') + except Exception: + pass else: # iTunes: look up album entity for artwork itunes_url = f"https://itunes.apple.com/lookup?id={artist_id}&entity=album&limit=5"