Fix key error

This commit is contained in:
angelblue05 2015-12-05 19:43:36 -06:00
parent 7b9a601735
commit 0200df3225

View file

@ -720,7 +720,7 @@ class LibrarySync(threading.Thread):
if "Episode" in itemType:
#get the tv show
cursor.execute("SELECT kodi_id FROM emby WHERE media_type='tvshow' AND emby_id=?", (MBitem["SeriesId"],))
cursor.execute("SELECT kodi_id FROM emby WHERE media_type='tvshow' AND emby_id=?", (MBitem.get("SeriesId"),))
result = cursor.fetchone()
if result:
kodi_show_id = result[0]
@ -737,7 +737,7 @@ class LibrarySync(threading.Thread):
elif "Season" in itemType:
#get the tv show
cursor.execute("SELECT kodi_id FROM emby WHERE media_type='tvshow' AND emby_id=?", (MBitem["SeriesId"],))
cursor.execute("SELECT kodi_id FROM emby WHERE media_type='tvshow' AND emby_id=?", (MBitem.get("SeriesId"),))
result = cursor.fetchone()
if result:
kodi_show_id = result[0]