mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
fix showid
In case the show id somehow changes, allow value to be updated for episodes
This commit is contained in:
parent
584711384f
commit
29fcc2569e
1 changed files with 4 additions and 4 deletions
|
@ -1396,23 +1396,23 @@ class TVShows(Items):
|
||||||
|
|
||||||
"UPDATE episode",
|
"UPDATE episode",
|
||||||
"SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,",
|
"SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,",
|
||||||
"c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, idSeason = ?",
|
"c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, idSeason = ?, idShow = ?",
|
||||||
"WHERE idEpisode = ?"
|
"WHERE idEpisode = ?"
|
||||||
))
|
))
|
||||||
kodicursor.execute(query, (title, plot, rating, writer, premieredate,
|
kodicursor.execute(query, (title, plot, rating, writer, premieredate,
|
||||||
runtime, director, season, episode, title, airsBeforeSeason,
|
runtime, director, season, episode, title, airsBeforeSeason,
|
||||||
airsBeforeEpisode, seasonid, episodeid))
|
airsBeforeEpisode, seasonid, showid, episodeid))
|
||||||
else:
|
else:
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"UPDATE episode",
|
"UPDATE episode",
|
||||||
"SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,",
|
"SET c00 = ?, c01 = ?, c03 = ?, c04 = ?, c05 = ?, c09 = ?, c10 = ?,",
|
||||||
"c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?",
|
"c12 = ?, c13 = ?, c14 = ?, c15 = ?, c16 = ?, idShow = ?",
|
||||||
"WHERE idEpisode = ?"
|
"WHERE idEpisode = ?"
|
||||||
))
|
))
|
||||||
kodicursor.execute(query, (title, plot, rating, writer, premieredate,
|
kodicursor.execute(query, (title, plot, rating, writer, premieredate,
|
||||||
runtime, director, season, episode, title, airsBeforeSeason,
|
runtime, director, season, episode, title, airsBeforeSeason,
|
||||||
airsBeforeEpisode, episodeid))
|
airsBeforeEpisode, showid, episodeid))
|
||||||
|
|
||||||
# Update the checksum in emby table
|
# Update the checksum in emby table
|
||||||
emby_db.updateReference(itemid, checksum)
|
emby_db.updateReference(itemid, checksum)
|
||||||
|
|
Loading…
Reference in a new issue