bring back jarvis compatibility

This commit is contained in:
im85288 2017-01-01 16:58:11 +00:00
parent cb30feba46
commit b572d60cd9
3 changed files with 12 additions and 12 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.emby" <addon id="plugin.video.emby"
name="Emby" name="Emby"
version="2.3.31" version="2.3.32"
provider-name="Emby.media"> provider-name="Emby.media">
<requires> <requires>
<import addon="xbmc.python" version="2.19.0"/> <import addon="xbmc.python" version="2.19.0"/>

View file

@ -240,19 +240,19 @@ class Movies(Items):
log.info("UPDATE movie itemid: %s - Title: %s", itemid, title) log.info("UPDATE movie itemid: %s - Title: %s", itemid, title)
# update new ratings Kodi 17 # update new ratings Kodi 17
if self.kodi_version > 16: if self.kodi_version >= 17:
ratingid = self.kodi_db.get_ratingid(movieid) ratingid = self.kodi_db.get_ratingid(movieid)
self.kodi_db.update_ratings(movieid, "movie", "default", rating, votecount,ratingid) self.kodi_db.update_ratings(movieid, "movie", "default", rating, votecount,ratingid)
# update new uniqueid Kodi 17 # update new uniqueid Kodi 17
if self.kodi_version > 16: if self.kodi_version >= 17:
uniqueid = self.kodi_db.get_uniqueid(movieid) uniqueid = self.kodi_db.get_uniqueid(movieid)
self.kodi_db.update_uniqueid(movieid, "movie", imdb, "imdb",uniqueid) self.kodi_db.update_uniqueid(movieid, "movie", imdb, "imdb",uniqueid)
# Update the movie entry # 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, self.kodi_db.update_movie_17(title, plot, shortplot, tagline, votecount, uniqueid,
writer, year, uniqueid, sorttitle, runtime, mpaa, genre, writer, year, uniqueid, sorttitle, runtime, mpaa, genre,
director, title, studio, trailer, country, year, director, title, studio, trailer, country, year,

View file

@ -607,24 +607,24 @@ class TVShows(Items):
log.info("UPDATE episode itemid: %s - Title: %s", itemid, title) log.info("UPDATE episode itemid: %s - Title: %s", itemid, title)
# update new ratings Kodi 17 # update new ratings Kodi 17
if self.kodi_version > 16: if self.kodi_version >= 17:
ratingid = self.kodi_db.get_ratingid(episodeid) ratingid = self.kodi_db.get_ratingid(episodeid)
self.kodi_db.update_ratings(episodeid, "episode", "default", rating, votecount,ratingid) self.kodi_db.update_ratings(episodeid, "episode", "default", rating, votecount,ratingid)
# update new uniqueid Kodi 17 # update new uniqueid Kodi 17
if self.kodi_version > 16: if self.kodi_version >= 17:
uniqueid = self.kodi_db.get_uniqueid(episodeid) uniqueid = self.kodi_db.get_uniqueid(episodeid)
self.kodi_db.update_uniqueid(episodeid, "episode", tvdb, "tvdb",uniqueid) self.kodi_db.update_uniqueid(episodeid, "episode", tvdb, "tvdb",uniqueid)
# Update the episode entry # Update the episode entry
if self.kodi_version > 16: if self.kodi_version >= 17:
# Kodi Krypton # Kodi Krypton
self.kodi_db.update_episode_16(title, plot, uniqueid, writer, premieredate, runtime, self.kodi_db.update_episode_16(title, plot, uniqueid, writer, premieredate, runtime,
director, season, episode, title, airsBeforeSeason, director, season, episode, title, airsBeforeSeason,
airsBeforeEpisode, seasonid, showid, episodeid) airsBeforeEpisode, seasonid, showid, episodeid)
elif self.kodi_version in 16: elif self.kodi_version > 16 and self.kodi_version < 17:
# Kodi Jarvis # Kodi Jarvis
self.kodi_db.update_episode_16(title, plot, rating, writer, premieredate, runtime, self.kodi_db.update_episode_16(title, plot, rating, writer, premieredate, runtime,
director, season, episode, title, airsBeforeSeason, director, season, episode, title, airsBeforeSeason,
@ -644,13 +644,13 @@ class TVShows(Items):
log.info("ADD episode itemid: %s - Title: %s", itemid, title) log.info("ADD episode itemid: %s - Title: %s", itemid, title)
# add new ratings Kodi 17 # add new ratings Kodi 17
if self.kodi_version > 16: if self.kodi_version >= 17:
ratingid = self.kodi_db.create_entry_rating() ratingid = self.kodi_db.create_entry_rating()
self.kodi_db.add_ratings(ratingid, showid, "episode", "default", rating, votecount) self.kodi_db.add_ratings(ratingid, showid, "episode", "default", rating, votecount)
# add new uniqueid Kodi 17 # add new uniqueid Kodi 17
if self.kodi_version > 16: if self.kodi_version >= 17:
uniqueid = self.kodi_db.create_entry_uniqueid() uniqueid = self.kodi_db.create_entry_uniqueid()
self.kodi_db.add_uniqueid(uniqueid, showid, "episode", tvdb, "tvdb") 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) fileid = self.kodi_db.add_file(filename, pathid)
# Create the episode entry # Create the episode entry
if self.kodi_version > 16: if self.kodi_version >= 17:
# Kodi Krypton # Kodi Krypton
self.kodi_db.add_episode_16(episodeid, fileid, title, plot, uniqueid, writer, self.kodi_db.add_episode_16(episodeid, fileid, title, plot, uniqueid, writer,
premieredate, runtime, director, season, episode, title, premieredate, runtime, director, season, episode, title,
showid, airsBeforeSeason, airsBeforeEpisode, seasonid) showid, airsBeforeSeason, airsBeforeEpisode, seasonid)
elif self.kodi_version in 16: elif self.kodi_version > 16 and self.kodi_version < 17:
# Kodi Jarvis # Kodi Jarvis
self.kodi_db.add_episode_16(episodeid, fileid, title, plot, rating, writer, self.kodi_db.add_episode_16(episodeid, fileid, title, plot, rating, writer,
premieredate, runtime, director, season, episode, title, premieredate, runtime, director, season, episode, title,