From a243b50f877a7706d042424c123551e3eb25a10e Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 3 Aug 2015 04:59:39 -0500 Subject: [PATCH] Revert itemtype change Since .getItem no longer returns None but returns an empty dictionary. --- resources/lib/LibrarySync.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/resources/lib/LibrarySync.py b/resources/lib/LibrarySync.py index 71950659..aeeb9feb 100644 --- a/resources/lib/LibrarySync.py +++ b/resources/lib/LibrarySync.py @@ -635,10 +635,8 @@ class LibrarySync(threading.Thread): for item in itemList: MBitem = ReadEmbyDB().getItem(item) - try: - itemType = MBitem.get('Type', "") - except: - itemType = "" + itemType = MBitem.get('Type', "") + #### PROCESS EPISODES ###### if "Episode" in itemType: @@ -690,10 +688,8 @@ class LibrarySync(threading.Thread): cursor = connection.cursor() for item in itemList: MBitem = ReadEmbyDB().getItem(item) - try: - itemType = MBitem.get('Type', "") - except: - itemType = "" + itemType = MBitem.get('Type', "") + if "MusicArtist" in itemType: WriteKodiMusicDB().addOrUpdateArtistToKodiLibrary(MBitem["Id"],connection, cursor) if "MusicAlbum" in itemType: