From adcfd2db701f98edf5e36023ff9933be61bc6bf2 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Wed, 22 Apr 2026 20:42:56 -0700 Subject: [PATCH] Fix 'no such column: deezer_artist_id' on watchlist artist config GET MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The library-enrichment query inside /api/watchlist/artist//config queries the `artists` table but used the column names from the watchlist_artists table: WHERE spotify_artist_id = ? OR itunes_artist_id = ? OR deezer_artist_id = ? OR discogs_artist_id = ? The `artists` table actually uses `deezer_id` and `discogs_id` for those two columns (only `watchlist_artists` uses the `_artist_id` suffix). The mismatch threw `no such column: deezer_artist_id` on every config GET, which was caught by the surrounding try/except and logged — releases came back empty and Spotify/genres etc. fell back to defaults. Visible side effects: the request that LOOKED slow ('1420.2ms') and the recurring ERROR line in app.log every time a watchlist artist overlay opened. Watchlist-config GET now returns proper banner_url / summary / style / mood / label / genres for Deezer- and Discogs-source artists too. The other watchlist queries in this endpoint (42302 / 42315 / 42379) correctly target watchlist_artists and stay as-is. --- web_server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web_server.py b/web_server.py index edcee566..7396b39c 100644 --- a/web_server.py +++ b/web_server.py @@ -42190,10 +42190,14 @@ def watchlist_artist_config(artist_id): try: conn2 = sqlite3.connect(str(database.database_path)) cur2 = conn2.cursor() + # The library `artists` table uses `deezer_id` / `discogs_id` for + # those columns; only the `watchlist_artists` table uses the + # `_artist_id` suffix for them. Mixing them was producing a + # 'no such column' on every watchlist-config GET. cur2.execute(""" SELECT banner_url, summary, style, mood, label, genres FROM artists - WHERE spotify_artist_id = ? OR itunes_artist_id = ? OR deezer_artist_id = ? OR discogs_artist_id = ? + WHERE spotify_artist_id = ? OR itunes_artist_id = ? OR deezer_id = ? OR discogs_id = ? LIMIT 1 """, (artist_id, artist_id, artist_id, artist_id)) lib_row = cur2.fetchone()