Fix skip_cache crash when watchlist scan uses non-Spotify client

iTunes and Deezer clients don't accept skip_cache param — only pass
it when the active client is the Spotify client (detected via sp attr).
This commit is contained in:
Broque Thomas 2026-03-31 22:01:20 -07:00
parent a7ebde8c01
commit 54f927320d

View file

@ -42891,7 +42891,9 @@ def playlist_explorer_build_tree():
# Fetch albums
try:
all_albums = active_client.get_artist_albums(artist_id, album_type='album,single', limit=50, skip_cache=True)
# skip_cache only supported by spotify_client — other clients don't cache this call
_skip = {'skip_cache': True} if hasattr(active_client, 'sp') else {}
all_albums = active_client.get_artist_albums(artist_id, album_type='album,single', limit=50, **_skip)
except Exception as e:
return {'success': False, 'error': f'Album fetch failed: {e}'}