From c3e70602c57ff5114223c8e4faf9c8dc556ce12b Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 18 Aug 2015 23:40:03 -0500 Subject: [PATCH] Fix potential local reference error --- resources/lib/WriteKodiMusicDB.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/WriteKodiMusicDB.py b/resources/lib/WriteKodiMusicDB.py index 2c35d9f6..67450501 100644 --- a/resources/lib/WriteKodiMusicDB.py +++ b/resources/lib/WriteKodiMusicDB.py @@ -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'],))