Fixed issue with spotify metadata conversion
This commit is contained in:
parent
13df374f1e
commit
8959a8c940
|
@ -123,7 +123,7 @@ class SpotifyHelper:
|
||||||
if 'external_ids' in spotify_track and 'isrc' in spotify_track['external_ids']:
|
if 'external_ids' in spotify_track and 'isrc' in spotify_track['external_ids']:
|
||||||
try:
|
try:
|
||||||
dz_track = dz.get_track_by_ISRC(spotify_track['external_ids']['isrc'])
|
dz_track = dz.get_track_by_ISRC(spotify_track['external_ids']['isrc'])
|
||||||
dz_track = dz_track['id'] if 'id' in dz_track else 0
|
dz_track = dz_track['id'] if 'id' in dz_track and 'title' in dz_track else 0
|
||||||
except:
|
except:
|
||||||
dz_track = dz.get_track_from_metadata(spotify_track['artists'][0]['name'], spotify_track['name'],
|
dz_track = dz.get_track_from_metadata(spotify_track['artists'][0]['name'], spotify_track['name'],
|
||||||
spotify_track['album']['name']) if fallbackSearch else 0
|
spotify_track['album']['name']) if fallbackSearch else 0
|
||||||
|
|
Loading…
Reference in New Issue