From b572d60cd92e2776e3104f776df27feb042fa225 Mon Sep 17 00:00:00 2001 From: im85288 Date: Sun, 1 Jan 2017 16:58:11 +0000 Subject: [PATCH] bring back jarvis compatibility --- addon.xml | 2 +- resources/lib/objects/movies.py | 6 +++--- resources/lib/objects/tvshows.py | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/addon.xml b/addon.xml index ef75ba40..44178301 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/objects/movies.py b/resources/lib/objects/movies.py index ccfa3075..85adf5fa 100644 --- a/resources/lib/objects/movies.py +++ b/resources/lib/objects/movies.py @@ -240,19 +240,19 @@ class Movies(Items): log.info("UPDATE movie itemid: %s - Title: %s", itemid, title) # update new ratings Kodi 17 - if self.kodi_version > 16: + if self.kodi_version >= 17: ratingid = self.kodi_db.get_ratingid(movieid) self.kodi_db.update_ratings(movieid, "movie", "default", rating, votecount,ratingid) # update new uniqueid Kodi 17 - if self.kodi_version > 16: + if self.kodi_version >= 17: uniqueid = self.kodi_db.get_uniqueid(movieid) self.kodi_db.update_uniqueid(movieid, "movie", imdb, "imdb",uniqueid) # Update the movie entry - if self.kodi_version > 16: + if self.kodi_version >= 17: self.kodi_db.update_movie_17(title, plot, shortplot, tagline, votecount, uniqueid, writer, year, uniqueid, sorttitle, runtime, mpaa, genre, director, title, studio, trailer, country, year, diff --git a/resources/lib/objects/tvshows.py b/resources/lib/objects/tvshows.py index 23d819d4..686d3e73 100644 --- a/resources/lib/objects/tvshows.py +++ b/resources/lib/objects/tvshows.py @@ -607,24 +607,24 @@ class TVShows(Items): log.info("UPDATE episode itemid: %s - Title: %s", itemid, title) # update new ratings Kodi 17 - if self.kodi_version > 16: + if self.kodi_version >= 17: ratingid = self.kodi_db.get_ratingid(episodeid) self.kodi_db.update_ratings(episodeid, "episode", "default", rating, votecount,ratingid) # update new uniqueid Kodi 17 - if self.kodi_version > 16: + if self.kodi_version >= 17: uniqueid = self.kodi_db.get_uniqueid(episodeid) self.kodi_db.update_uniqueid(episodeid, "episode", tvdb, "tvdb",uniqueid) # Update the episode entry - if self.kodi_version > 16: + if self.kodi_version >= 17: # Kodi Krypton self.kodi_db.update_episode_16(title, plot, uniqueid, writer, premieredate, runtime, director, season, episode, title, airsBeforeSeason, airsBeforeEpisode, seasonid, showid, episodeid) - elif self.kodi_version in 16: + elif self.kodi_version > 16 and self.kodi_version < 17: # Kodi Jarvis self.kodi_db.update_episode_16(title, plot, rating, writer, premieredate, runtime, director, season, episode, title, airsBeforeSeason, @@ -644,13 +644,13 @@ class TVShows(Items): log.info("ADD episode itemid: %s - Title: %s", itemid, title) # add new ratings Kodi 17 - if self.kodi_version > 16: + if self.kodi_version >= 17: ratingid = self.kodi_db.create_entry_rating() self.kodi_db.add_ratings(ratingid, showid, "episode", "default", rating, votecount) # add new uniqueid Kodi 17 - if self.kodi_version > 16: + if self.kodi_version >= 17: uniqueid = self.kodi_db.create_entry_uniqueid() self.kodi_db.add_uniqueid(uniqueid, showid, "episode", tvdb, "tvdb") @@ -661,12 +661,12 @@ class TVShows(Items): fileid = self.kodi_db.add_file(filename, pathid) # Create the episode entry - if self.kodi_version > 16: + if self.kodi_version >= 17: # Kodi Krypton self.kodi_db.add_episode_16(episodeid, fileid, title, plot, uniqueid, writer, premieredate, runtime, director, season, episode, title, showid, airsBeforeSeason, airsBeforeEpisode, seasonid) - elif self.kodi_version in 16: + elif self.kodi_version > 16 and self.kodi_version < 17: # Kodi Jarvis self.kodi_db.add_episode_16(episodeid, fileid, title, plot, rating, writer, premieredate, runtime, director, season, episode, title,