Update web_server.py
This commit is contained in:
parent
ca130e5000
commit
d64bcaf7ab
1 changed files with 7 additions and 1 deletions
|
|
@ -15433,7 +15433,13 @@ def _run_sync_task(playlist_id, playlist_name, tracks_json):
|
|||
|
||||
# Try each artist (same logic as original)
|
||||
for artist in spotify_track.artists:
|
||||
artist_name = artist if isinstance(artist, str) else str(artist)
|
||||
# Extract artist name from both string and dict formats
|
||||
if isinstance(artist, str):
|
||||
artist_name = artist
|
||||
elif isinstance(artist, dict) and 'name' in artist:
|
||||
artist_name = artist['name']
|
||||
else:
|
||||
artist_name = str(artist)
|
||||
|
||||
db_track, confidence = db.check_track_exists(
|
||||
original_title, artist_name,
|
||||
|
|
|
|||
Loading…
Reference in a new issue