From f10beeea0a387d07b9ed97f836a3d3a4a3305bc1 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Mon, 16 Mar 2026 13:37:53 -0700 Subject: [PATCH] Add source badges (Spotify/iTunes/Deezer) to watchlist artist cards Shows which metadata sources each artist is matched to with small colored badges on the card. Also adds deezer_artist_id to the watchlist API response and fixes the data-artist-id fallback chain to include Deezer-only artists. --- web_server.py | 1 + webui/static/script.js | 12 +++++++++--- webui/static/style.css | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/web_server.py b/web_server.py index d1210e43..ef51af77 100644 --- a/web_server.py +++ b/web_server.py @@ -30128,6 +30128,7 @@ def get_watchlist_artists(): "updated_at": artist.updated_at.isoformat() if artist.updated_at else None, "image_url": artist.image_url, # Cached during watchlist scans "itunes_artist_id": artist.itunes_artist_id, # For iTunes-only artists + "deezer_artist_id": getattr(artist, 'deezer_artist_id', None), "include_albums": artist.include_albums, "include_eps": artist.include_eps, "include_singles": artist.include_singles, diff --git a/webui/static/script.js b/webui/static/script.js index 9cb5a672..6b07fc79 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -34267,21 +34267,26 @@ async function showWatchlistModal() { if (artist.include_remixes) pills.push('Remixes'); if (artist.include_acoustic) pills.push('Acoustic'); if (artist.include_compilations) pills.push('Compilations'); + const sourceBadges = []; + if (artist.spotify_artist_id) sourceBadges.push('Spotify'); + if (artist.itunes_artist_id) sourceBadges.push('iTunes'); + if (artist.deezer_artist_id) sourceBadges.push('Deezer'); + const artistPrimaryId = artist.spotify_artist_id || artist.itunes_artist_id || artist.deezer_artist_id; return `