Fix potential local reference error

This commit is contained in:
angelblue05 2015-08-18 23:40:03 -05:00
parent c6762782ed
commit c3e70602c5

View file

@ -222,8 +222,8 @@ class WriteKodiMusicDB():
# Link album to artists
if MBartists:
album_artists = MBitem['AlbumArtists']
elif MBitem.get('ArtistItems'):
album_artists = MBitem['ArtistItems']
else:
album_artists = MBitem.get('ArtistItems', [])
for artist in album_artists:
cursor.execute("SELECT kodi_id FROM emby WHERE emby_id = ?", (artist['Id'],))