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]