From 70182edf0ebac714d651417c1ba4841b6424e3f4 Mon Sep 17 00:00:00 2001 From: im85288 Date: Fri, 1 May 2015 20:13:15 +0100 Subject: [PATCH 1/2] fix for update path - takes 2 parameters --- resources/lib/WriteKodiDB.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/WriteKodiDB.py b/resources/lib/WriteKodiDB.py index 26727583..c718297c 100644 --- a/resources/lib/WriteKodiDB.py +++ b/resources/lib/WriteKodiDB.py @@ -485,7 +485,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) From 392863fa933685a1e926583cd8c8ff543fef516f Mon Sep 17 00:00:00 2001 From: im85288 Date: Fri, 1 May 2015 20:15:43 +0100 Subject: [PATCH 2/2] update episode rather than tv show --- resources/lib/LibrarySync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)