mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
Update to fix movie year in krypton
Not officially supported
This commit is contained in:
parent
16691b585d
commit
02dee885e8
1 changed files with 49 additions and 22 deletions
|
@ -399,6 +399,19 @@ class Movies(Items):
|
||||||
log.info("UPDATE movie itemid: %s - Title: %s" % (itemid, title))
|
log.info("UPDATE movie itemid: %s - Title: %s" % (itemid, title))
|
||||||
|
|
||||||
# Update the movie entry
|
# Update the movie entry
|
||||||
|
if self.kodiversion > 16:
|
||||||
|
query = ' '.join((
|
||||||
|
|
||||||
|
"UPDATE movie",
|
||||||
|
"SET c00 = ?, c01 = ?, c02 = ?, c03 = ?, c04 = ?, c05 = ?, c06 = ?,",
|
||||||
|
"c07 = ?, c09 = ?, c10 = ?, c11 = ?, c12 = ?, c14 = ?, c15 = ?,",
|
||||||
|
"c16 = ?, c18 = ?, c19 = ?, c21 = ?, premiered = ?",
|
||||||
|
"WHERE idMovie = ?"
|
||||||
|
))
|
||||||
|
kodicursor.execute(query, (title, plot, shortplot, tagline, votecount, rating,
|
||||||
|
writer, year, imdb, sorttitle, runtime, mpaa, genre, director, title, studio,
|
||||||
|
trailer, country, year, movieid))
|
||||||
|
else:
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"UPDATE movie",
|
"UPDATE movie",
|
||||||
|
@ -407,9 +420,9 @@ class Movies(Items):
|
||||||
"c16 = ?, c18 = ?, c19 = ?, c21 = ?",
|
"c16 = ?, c18 = ?, c19 = ?, c21 = ?",
|
||||||
"WHERE idMovie = ?"
|
"WHERE idMovie = ?"
|
||||||
))
|
))
|
||||||
kodicursor.execute(query, (title, plot, shortplot, tagline, votecount, rating, writer,
|
kodicursor.execute(query, (title, plot, shortplot, tagline, votecount, rating,
|
||||||
year, imdb, sorttitle, runtime, mpaa, genre, director, title, studio, trailer,
|
writer, year, imdb, sorttitle, runtime, mpaa, genre, director, title, studio,
|
||||||
country, movieid))
|
trailer, country, movieid))
|
||||||
|
|
||||||
# Update the checksum in emby table
|
# Update the checksum in emby table
|
||||||
emby_db.updateReference(itemid, checksum)
|
emby_db.updateReference(itemid, checksum)
|
||||||
|
@ -424,6 +437,20 @@ class Movies(Items):
|
||||||
fileid = self.kodi_db.addFile(filename, pathid)
|
fileid = self.kodi_db.addFile(filename, pathid)
|
||||||
|
|
||||||
# Create the movie entry
|
# Create the movie entry
|
||||||
|
if self.kodiversion > 16:
|
||||||
|
query = (
|
||||||
|
'''
|
||||||
|
INSERT INTO movie(
|
||||||
|
idMovie, idFile, c00, c01, c02, c03, c04, c05, c06, c07,
|
||||||
|
c09, c10, c11, c12, c14, c15, c16, c18, c19, c21, premiered)
|
||||||
|
|
||||||
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||||
|
'''
|
||||||
|
)
|
||||||
|
kodicursor.execute(query, (movieid, fileid, title, plot, shortplot, tagline,
|
||||||
|
votecount, rating, writer, year, imdb, sorttitle, runtime, mpaa, genre,
|
||||||
|
director, title, studio, trailer, country, year))
|
||||||
|
else:
|
||||||
query = (
|
query = (
|
||||||
'''
|
'''
|
||||||
INSERT INTO movie(
|
INSERT INTO movie(
|
||||||
|
@ -433,9 +460,9 @@ class Movies(Items):
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
kodicursor.execute(query, (movieid, fileid, title, plot, shortplot, tagline, votecount,
|
kodicursor.execute(query, (movieid, fileid, title, plot, shortplot, tagline,
|
||||||
rating, writer, year, imdb, sorttitle, runtime, mpaa, genre, director, title,
|
votecount, rating, writer, year, imdb, sorttitle, runtime, mpaa, genre,
|
||||||
studio, trailer, country))
|
director, title, studio, trailer, country))
|
||||||
|
|
||||||
# Create the reference in emby table
|
# Create the reference in emby table
|
||||||
emby_db.addReference(itemid, movieid, "Movie", "movie", fileid, pathid, None, checksum, viewid)
|
emby_db.addReference(itemid, movieid, "Movie", "movie", fileid, pathid, None, checksum, viewid)
|
||||||
|
|
Loading…
Reference in a new issue