From 29fcc2569e236141efe8f0e9ee7d9fe99a1bc75c Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 7 Oct 2016 22:26:51 -0500 Subject: [PATCH] fix showid In case the show id somehow changes, allow value to be updated for episodes --- resources/lib/itemtypes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 292dd052..265f0cf3 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -1396,23 +1396,23 @@ class TVShows(Items): "UPDATE episode", "SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,", - "c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, idSeason = ?", + "c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, idSeason = ?, idShow = ?", "WHERE idEpisode = ?" )) kodicursor.execute(query, (title, plot, rating, writer, premieredate, runtime, director, season, episode, title, airsBeforeSeason, - airsBeforeEpisode, seasonid, episodeid)) + airsBeforeEpisode, seasonid, showid, episodeid)) else: query = ' '.join(( "UPDATE episode", "SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,", - "c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?", + "c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, idShow = ?", "WHERE idEpisode = ?" )) kodicursor.execute(query, (title, plot, rating, writer, premieredate, runtime, director, season, episode, title, airsBeforeSeason, - airsBeforeEpisode, episodeid)) + airsBeforeEpisode, showid, episodeid)) # Update the checksum in emby table emby_db.updateReference(itemid, checksum)