Account for missing IMDB ids for movies

This commit is contained in:
tomkat83 2017-05-01 10:32:04 +02:00
parent 431e95706f
commit 002cbe9025

View file

@ -324,6 +324,7 @@ class Movies(Items):
votecount, votecount,
rating_id) rating_id)
# update new uniqueid Kodi 17 # update new uniqueid Kodi 17
if imdb is not None:
uniqueid = self.kodi_db.get_uniqueid(movieid, uniqueid = self.kodi_db.get_uniqueid(movieid,
v.KODI_TYPE_MOVIE) v.KODI_TYPE_MOVIE)
self.kodi_db.update_uniqueid(movieid, self.kodi_db.update_uniqueid(movieid,
@ -331,6 +332,8 @@ class Movies(Items):
imdb, imdb,
"imdb", "imdb",
uniqueid) uniqueid)
else:
uniqueid = -1
query = ''' query = '''
UPDATE movie UPDATE movie
SET c00 = ?, c01 = ?, c02 = ?, c03 = ?, c04 = ?, c05 = ?, SET c00 = ?, c01 = ?, c02 = ?, c03 = ?, c04 = ?, c05 = ?,
@ -372,12 +375,15 @@ class Movies(Items):
rating, rating,
votecount) votecount)
# add new uniqueid Kodi 17 # add new uniqueid Kodi 17
if imdb is not None:
uniqueid = self.kodi_db.create_entry_uniqueid() uniqueid = self.kodi_db.create_entry_uniqueid()
self.kodi_db.add_uniqueid(uniqueid, self.kodi_db.add_uniqueid(uniqueid,
movieid, movieid,
v.KODI_TYPE_MOVIE, v.KODI_TYPE_MOVIE,
imdb, imdb,
"imdb") "imdb")
else:
uniqueid = -1
query = ''' query = '''
INSERT INTO movie(idMovie, idFile, c00, c01, c02, c03, INSERT INTO movie(idMovie, idFile, c00, c01, c02, c03,
c04, c05, c06, c07, c09, c10, c11, c12, c14, c15, c16, c04, c05, c06, c07, c09, c10, c11, c12, c14, c15, c16,