Fix albumartist

This commit is contained in:
angelblue05 2015-11-06 22:40:08 -06:00
parent d03d24d078
commit 9f4584d83f

View file

@ -332,7 +332,12 @@ class WriteKodiMusicDB():
cursor.execute(query, (albumid, artists, genre, year, dateadded)) cursor.execute(query, (albumid, artists, genre, year, dateadded))
finally: finally:
# Link album to artists # Link album to artists
for artist in MBitem['ArtistItems']: if MBitem['AlbumArtists']:
album_artists = MBitem['AlbumArtists']
else:
album_artists = MBitem['ArtistItems']
for artist in album_artists:
cursor.execute("SELECT kodi_id FROM emby WHERE emby_id = ?", (artist['Id'],)) cursor.execute("SELECT kodi_id FROM emby WHERE emby_id = ?", (artist['Id'],))
try: try:
artistid = cursor.fetchone()[0] artistid = cursor.fetchone()[0]