Merge branch 'database_changes' of https://github.com/MediaBrowser/Emby.Kodi into database_changes

This commit is contained in:
Marcel van der Veldt 2015-05-01 22:14:15 +02:00
commit cf2c5ef701
2 changed files with 2 additions and 2 deletions

View file

@ -204,7 +204,7 @@ class LibrarySync():
else: else:
# If there are changes to the item, perform a full sync of the item # If there are changes to the item, perform a full sync of the item
if kodiEpisode[2] != item["Name"] or item["Id"] in itemList: 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 ##### #### EPISODES: PROCESS DELETES #####
allEmbyEpisodeIds = set(allEmbyEpisodeIds) allEmbyEpisodeIds = set(allEmbyEpisodeIds)

View file

@ -518,7 +518,7 @@ class WriteKodiDB():
# UPDATE THE EPISODE IN KODI (for now, we just send in all data) # UPDATE THE EPISODE IN KODI (for now, we just send in all data)
else: else:
pathsql = "UPDATE episode SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?, c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, embyId = ? WHERE idEpisode = ?" 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 #update or insert actors
self.AddPeopleToMedia(episodeid,MBitem.get("People"),"episode", connection, cursor) self.AddPeopleToMedia(episodeid,MBitem.get("People"),"episode", connection, cursor)