Fix TheTVDB ID for TV shows

- Partially fixes #277
This commit is contained in:
tomkat83 2017-05-01 09:53:40 +02:00
parent 7b33cc95b9
commit bc3a81b12a

View file

@ -621,7 +621,7 @@ class TVShows(Items):
self.kodi_db.update_uniqueid(showid, self.kodi_db.update_uniqueid(showid,
v.KODI_TYPE_SHOW, v.KODI_TYPE_SHOW,
tvdb, tvdb,
"tvdb", "unknown",
uniqueid) uniqueid)
# Update the tvshow entry # Update the tvshow entry
query = ''' query = '''
@ -631,8 +631,9 @@ class TVShows(Items):
WHERE idShow = ? WHERE idShow = ?
''' '''
kodicursor.execute(query, (title, plot, rating_id, kodicursor.execute(query, (title, plot, rating_id,
premieredate, genre, title, tvdb, premieredate, genre, title,
mpaa, studio, sorttitle, showid)) uniqueid, mpaa, studio, sorttitle,
showid))
else: else:
# Update the tvshow entry # Update the tvshow entry
query = ''' query = '''
@ -679,7 +680,8 @@ class TVShows(Items):
rating, rating,
votecount) votecount)
# add new uniqueid Kodi 17 # add new uniqueid Kodi 17
self.kodi_db.add_uniqueid(self.kodi_db.create_entry_uniqueid(), uniqueid = self.kodi_db.create_entry_uniqueid()
self.kodi_db.add_uniqueid(uniqueid,
showid, showid,
v.KODI_TYPE_SHOW, v.KODI_TYPE_SHOW,
tvdb, tvdb,