diff --git a/core/watchlist_scanner.py b/core/watchlist_scanner.py index 0a6512c2..d7fa9d77 100644 --- a/core/watchlist_scanner.py +++ b/core/watchlist_scanner.py @@ -1148,6 +1148,7 @@ class WatchlistScanner: album_images = album.get('images', []) album_type = album.get('album_type', 'album') # 'album', 'single', or 'ep' total_tracks = album.get('total_tracks', 0) + album_artists = album.get('artists', []) else: album_name = album.name album_id = album.id @@ -1155,6 +1156,7 @@ class WatchlistScanner: album_images = album.images if hasattr(album, 'images') else [] album_type = album.album_type if hasattr(album, 'album_type') else 'album' total_tracks = album.total_tracks if hasattr(album, 'total_tracks') else 0 + album_artists = album.artists if hasattr(album, 'artists') else [] # Create Spotify track data structure spotify_track_data = { @@ -1167,7 +1169,8 @@ class WatchlistScanner: 'release_date': album_release_date, 'images': album_images, 'album_type': album_type, # Store album type for category filtering - 'total_tracks': total_tracks # Store track count for accurate categorization + 'total_tracks': total_tracks, # Store track count for accurate categorization + 'artists': album_artists }, 'duration_ms': track_duration, 'explicit': track_explicit, diff --git a/web_server.py b/web_server.py index 20757ede..7e9cc222 100644 --- a/web_server.py +++ b/web_server.py @@ -14651,9 +14651,9 @@ def _run_full_missing_tracks_process(batch_id, playlist_id, tracks_json): artist_ctx = first_artist else: artist_ctx = {'name': str(first_artist)} - elif source_info.get('artist_name'): + elif source_info.get('artist_name') or source_info.get('watchlist_artist_name'): # Fallback: album artist name from source_info (set at wishlist add time) - artist_ctx = {'name': source_info['artist_name']} + artist_ctx = {'name': source_info.get('artist_name') or source_info['watchlist_artist_name']} elif s_artists and len(s_artists) > 0: # Last resort: track-level artist (old wishlist entries without album artist data) first_artist = s_artists[0]