From 0200df3225c6c273b7d5c097d6c731f4480feda9 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 5 Dec 2015 19:43:36 -0600 Subject: [PATCH] Fix key error --- resources/lib/LibrarySync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/LibrarySync.py b/resources/lib/LibrarySync.py index 601c5f95..f50c88e2 100644 --- a/resources/lib/LibrarySync.py +++ b/resources/lib/LibrarySync.py @@ -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]