diff --git a/resources/lib/LibrarySync.py b/resources/lib/LibrarySync.py index d95d2989..a0363d02 100644 --- a/resources/lib/LibrarySync.py +++ b/resources/lib/LibrarySync.py @@ -204,7 +204,7 @@ class LibrarySync(): else: # If there are changes to the item, perform a full sync of the item if kodiEpisode[2] != item["Name"] or item["Id"] in itemList: - WriteKodiDB().addOrUpdateTvShowToKodiLibrary(item["Id"], kodiShowId, connection, cursor) + WriteKodiDB().addOrUpdateEpisodeToKodiLibrary(item["Id"], kodiShowId, connection, cursor) #### EPISODES: PROCESS DELETES ##### allEmbyEpisodeIds = set(allEmbyEpisodeIds) diff --git a/resources/lib/WriteKodiDB.py b/resources/lib/WriteKodiDB.py index dd778dd1..ff4dc30e 100644 --- a/resources/lib/WriteKodiDB.py +++ b/resources/lib/WriteKodiDB.py @@ -518,7 +518,7 @@ class WriteKodiDB(): # UPDATE THE EPISODE IN KODI (for now, we just send in all data) else: pathsql = "UPDATE episode SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?, c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, embyId = ? WHERE idEpisode = ?" - cursor.execute(pathsql, title, plot, rating, writer, premieredate, runtime, director, season, episode, title, MBitem["Id"], episodeid) + cursor.execute(pathsql, (title, plot, rating, writer, premieredate, runtime, director, season, episode, title, "-1", "-1", MBitem["Id"], episodeid)) #update or insert actors self.AddPeopleToMedia(episodeid,MBitem.get("People"),"episode", connection, cursor)