Revert itemtype change

Since .getItem no longer returns None but returns an empty dictionary.
This commit is contained in:
angelblue05 2015-08-03 04:59:39 -05:00
parent 3aa2598c79
commit a243b50f87

View file

@ -635,10 +635,8 @@ class LibrarySync(threading.Thread):
for item in itemList: for item in itemList:
MBitem = ReadEmbyDB().getItem(item) MBitem = ReadEmbyDB().getItem(item)
try:
itemType = MBitem.get('Type', "") itemType = MBitem.get('Type', "")
except:
itemType = ""
#### PROCESS EPISODES ###### #### PROCESS EPISODES ######
if "Episode" in itemType: if "Episode" in itemType:
@ -690,10 +688,8 @@ class LibrarySync(threading.Thread):
cursor = connection.cursor() cursor = connection.cursor()
for item in itemList: for item in itemList:
MBitem = ReadEmbyDB().getItem(item) MBitem = ReadEmbyDB().getItem(item)
try:
itemType = MBitem.get('Type', "") itemType = MBitem.get('Type', "")
except:
itemType = ""
if "MusicArtist" in itemType: if "MusicArtist" in itemType:
WriteKodiMusicDB().addOrUpdateArtistToKodiLibrary(MBitem["Id"],connection, cursor) WriteKodiMusicDB().addOrUpdateArtistToKodiLibrary(MBitem["Id"],connection, cursor)
if "MusicAlbum" in itemType: if "MusicAlbum" in itemType: