From f51a8a9ee968229e971e506b0cd8ffb5cc12fd73 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Thu, 2 Apr 2026 21:09:11 -0700 Subject: [PATCH] =?UTF-8?q?Add=20Discogs=20to=20watchlist=20UI=20=E2=80=94?= =?UTF-8?q?=20badges,=20provider=20section,=20config=20endpoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Watchlist artist list: discogs_artist_id in API response - Watchlist source badges: Discogs badge on artist cards - Watchlist config modal: discogs_artist_id in SQL query, WHERE clause, response, and linked provider section with badge - CSS for watchlist-source-discogs and watchlist-provider-badge.discogs --- web_server.py | 9 ++++++--- webui/static/script.js | 13 +++++++++---- webui/static/style.css | 11 +++++++++++ 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/web_server.py b/web_server.py index cad9f2b0..54141a02 100644 --- a/web_server.py +++ b/web_server.py @@ -36572,6 +36572,7 @@ def get_watchlist_artists(): "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), + "discogs_artist_id": getattr(artist, 'discogs_artist_id', None), "include_albums": artist.include_albums, "include_eps": artist.include_eps, "include_singles": artist.include_singles, @@ -37531,10 +37532,10 @@ def watchlist_artist_config(artist_id): include_live, include_remixes, include_acoustic, include_compilations, artist_name, image_url, spotify_artist_id, itunes_artist_id, last_scan_timestamp, date_added, include_instrumentals, deezer_artist_id, - lookback_days + lookback_days, discogs_artist_id FROM watchlist_artists - WHERE spotify_artist_id = ? OR itunes_artist_id = ? OR deezer_artist_id = ? - """, (artist_id, artist_id, artist_id)) + WHERE spotify_artist_id = ? OR itunes_artist_id = ? OR deezer_artist_id = ? OR discogs_artist_id = ? + """, (artist_id, artist_id, artist_id, artist_id)) result = cursor.fetchone() conn.close() @@ -37546,6 +37547,7 @@ def watchlist_artist_config(artist_id): spotify_id = result[9] # spotify_artist_id from query itunes_id = result[10] # itunes_artist_id from query deezer_id = result[14] # deezer_artist_id from query + discogs_id = result[16] # discogs_artist_id from query # Get artist info from Spotify (only for Spotify artists) artist_info = None @@ -37644,6 +37646,7 @@ def watchlist_artist_config(artist_id): "spotify_artist_id": spotify_id, "itunes_artist_id": itunes_id, "deezer_artist_id": deezer_id, + "discogs_artist_id": discogs_id, "watchlist_name": result[7], # Original stored watchlist artist name }) diff --git a/webui/static/script.js b/webui/static/script.js index a6324a41..024d4f53 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -38781,6 +38781,7 @@ async function showWatchlistModal() { if (artist.spotify_artist_id) sourceBadges.push('Spotify'); if (artist.itunes_artist_id) sourceBadges.push('iTunes'); if (artist.deezer_artist_id) sourceBadges.push('Deezer'); + if (artist.discogs_artist_id) sourceBadges.push('Discogs'); const artistPrimaryId = artist.spotify_artist_id || artist.itunes_artist_id || artist.deezer_artist_id; return `