Fix movie year for Krypton (reset your Kodi DB!)

- Fixes #79
This commit is contained in:
tomkat83 2016-10-18 20:47:45 +02:00
parent d71f6e8887
commit 5ac807760b

View file

@ -430,17 +430,32 @@ class Movies(Items):
% (itemid, title)) % (itemid, title))
# Update the movie entry # Update the movie entry
if self.kodiversion > 16:
query = ' '.join(( query = ' '.join((
"UPDATE movie", "UPDATE movie",
"SET c00 = ?, c01 = ?, c02 = ?, c03 = ?, c04 = ?, c05 = ?, c06 = ?,", "SET c00 = ?, c01 = ?, c02 = ?, c03 = ?, c04 = ?, c05 = ?,"
"c07 = ?, c09 = ?, c10 = ?, c11 = ?, c12 = ?, c14 = ?, c15 = ?,", "c06 = ?, c07 = ?, c09 = ?, c10 = ?, c11 = ?, c12 = ?,"
"c16 = ?, c18 = ?, c19 = ?, c21 = ?, c22 = ?, c23 = ?", "c14 = ?, c15 = ?, c16 = ?, c18 = ?, c19 = ?, c21 = ?,"
"c22 = ?, c23 = ?, premiered = ?",
"WHERE idMovie = ?" "WHERE idMovie = ?"
)) ))
kodicursor.execute(query, (title, plot, shortplot, tagline, votecount, rating, writer, kodicursor.execute(query, (title, plot, shortplot, tagline,
year, imdb, sorttitle, runtime, mpaa, genre, director, title, studio, trailer, votecount, rating, writer, year, imdb, sorttitle, runtime,
country, playurl, pathid, movieid)) mpaa, genre, director, title, studio, trailer, country,
playurl, pathid, year, movieid))
else:
query = ' '.join((
"UPDATE movie",
"SET c00 = ?, c01 = ?, c02 = ?, c03 = ?, c04 = ?, c05 = ?,"
"c06 = ?, c07 = ?, c09 = ?, c10 = ?, c11 = ?, c12 = ?,"
"c14 = ?, c15 = ?, c16 = ?, c18 = ?, c19 = ?, c21 = ?,"
"c22 = ?, c23 = ?",
"WHERE idMovie = ?"
))
kodicursor.execute(query, (title, plot, shortplot, tagline,
votecount, rating, writer, year, imdb, sorttitle, runtime,
mpaa, genre, director, title, studio, trailer, country,
playurl, pathid, movieid))
# Update the checksum in emby table # Update the checksum in emby table
emby_db.updateReference(itemid, checksum) emby_db.updateReference(itemid, checksum)