Account for missing TheTVDB ids

This commit is contained in:
tomkat83 2017-05-01 10:08:23 +02:00
parent b715b16f05
commit 431e95706f

View file

@ -617,12 +617,16 @@ class TVShows(Items):
votecount, votecount,
rating_id) rating_id)
# update new uniqueid Kodi 17 # update new uniqueid Kodi 17
uniqueid = self.kodi_db.get_uniqueid(showid, v.KODI_TYPE_SHOW) if tvdb is not None:
uniqueid = self.kodi_db.get_uniqueid(showid,
v.KODI_TYPE_SHOW)
self.kodi_db.update_uniqueid(showid, self.kodi_db.update_uniqueid(showid,
v.KODI_TYPE_SHOW, v.KODI_TYPE_SHOW,
tvdb, tvdb,
"unknown", "unknown",
uniqueid) uniqueid)
else:
uniqueid = -1
# Update the tvshow entry # Update the tvshow entry
query = ''' query = '''
UPDATE tvshow UPDATE tvshow
@ -680,12 +684,15 @@ class TVShows(Items):
rating, rating,
votecount) votecount)
# add new uniqueid Kodi 17 # add new uniqueid Kodi 17
if tvdb 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,
showid, showid,
v.KODI_TYPE_SHOW, v.KODI_TYPE_SHOW,
tvdb, tvdb,
"unknown") "unknown")
else:
uniqueid = -1
# Create the tvshow entry # Create the tvshow entry
query = ''' query = '''
INSERT INTO tvshow( INSERT INTO tvshow(