Fix removing uniqueid and ratings

This commit is contained in:
tomkat83 2017-02-02 17:09:20 +01:00
parent dd0339b51c
commit 8b9c116f26

View file

@ -480,8 +480,8 @@ class Movies(Items):
kodicursor.execute("DELETE FROM files WHERE idFile = ?", kodicursor.execute("DELETE FROM files WHERE idFile = ?",
(file_id,)) (file_id,))
if v.KODIVERSION >= 17: if v.KODIVERSION >= 17:
plex_db.remove_uniqueid(kodi_id, kodi_type) self.kodi_db.remove_uniqueid(kodi_id, kodi_type)
plex_db.remove_ratings(kodi_id, kodi_type) self.kodi_db.remove_ratings(kodi_id, kodi_type)
elif kodi_type == v.KODI_TYPE_SET: elif kodi_type == v.KODI_TYPE_SET:
# Delete kodi boxset # Delete kodi boxset
boxset_movies = plex_db.getItem_byParentId(kodi_id, boxset_movies = plex_db.getItem_byParentId(kodi_id,
@ -1189,8 +1189,8 @@ class TVShows(Items):
self.artwork.deleteArtwork(kodi_id, v.KODI_TYPE_SHOW, kodicursor) self.artwork.deleteArtwork(kodi_id, v.KODI_TYPE_SHOW, kodicursor)
kodicursor.execute("DELETE FROM tvshow WHERE idShow = ?", (kodi_id,)) kodicursor.execute("DELETE FROM tvshow WHERE idShow = ?", (kodi_id,))
if v.KODIVERSION >= 17: if v.KODIVERSION >= 17:
self.plex_db.remove_uniqueid(kodi_id, v.KODI_TYPE_SHOW) self.kodi_db.remove_uniqueid(kodi_id, v.KODI_TYPE_SHOW)
self.plex_db.remove_ratings(kodi_id, v.KODI_TYPE_SHOW) self.kodi_db.remove_ratings(kodi_id, v.KODI_TYPE_SHOW)
log.info("Removed tvshow: %s." % kodi_id) log.info("Removed tvshow: %s." % kodi_id)
def removeSeason(self, kodiid): def removeSeason(self, kodiid):