From d1516021ae7ddc130f0eff204b292be44314e1fe Mon Sep 17 00:00:00 2001 From: Broque Thomas Date: Mon, 9 Feb 2026 16:26:50 -0800 Subject: [PATCH] remove debugging --- web_server.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/web_server.py b/web_server.py index 6e931806..7bf7ecf6 100644 --- a/web_server.py +++ b/web_server.py @@ -19844,19 +19844,12 @@ def get_discover_hero(): # Try to get artist image from the active source try: - # DEBUG: Log what we're starting with - print(f"[Hero Debug] Processing artist: DB name='{artist.similar_artist_name}', Spotify ID={artist.similar_artist_spotify_id}, iTunes ID={artist.similar_artist_itunes_id}") - if active_source == 'spotify' and artist.similar_artist_spotify_id: if spotify_client and spotify_client.is_authenticated(): sp_artist = spotify_client.get_artist(artist.similar_artist_spotify_id) if sp_artist and sp_artist.get('images'): - api_name = sp_artist.get('name', 'UNKNOWN') - print(f"[Hero Debug] Spotify API returned name='{api_name}' for ID={artist.similar_artist_spotify_id}") - print(f"[Hero Debug] Name match? {api_name == artist.similar_artist_name}") - - # Use canonical name from API - artist_data['artist_name'] = api_name + # Use canonical name from Spotify API to ensure it matches the image + artist_data['artist_name'] = sp_artist.get('name', artist.similar_artist_name) artist_data['image_url'] = sp_artist['images'][0]['url'] if sp_artist['images'] else None artist_data['genres'] = sp_artist.get('genres', []) artist_data['popularity'] = sp_artist.get('popularity', 0) @@ -19864,12 +19857,7 @@ def get_discover_hero(): itunes_artist = itunes_client.get_artist(artist.similar_artist_itunes_id) if itunes_artist: # iTunes client normalizes to Spotify format, so use 'name' not 'artistName' - api_name = itunes_artist.get('name', 'UNKNOWN') - print(f"[Hero Debug] iTunes API returned name='{api_name}' for ID={artist.similar_artist_itunes_id}") - print(f"[Hero Debug] Name match? {api_name == artist.similar_artist_name}") - - # Use canonical name from API - artist_data['artist_name'] = api_name + artist_data['artist_name'] = itunes_artist.get('name', artist.similar_artist_name) artist_data['image_url'] = itunes_artist.get('images', [{}])[0].get('url') if itunes_artist.get('images') else None artist_data['genres'] = itunes_artist.get('genres', []) artist_data['popularity'] = itunes_artist.get('popularity', 0)