Sync season name for Jarvis or higher

This commit is contained in:
angelblue05 2016-09-06 22:57:33 -05:00
parent 21f8a62ebd
commit b65d6baad0
2 changed files with 6 additions and 2 deletions

View File

@ -1192,7 +1192,7 @@ class TVShows(Items):
self.add_update(show)
return
seasonid = self.kodi_db.addSeason(showid, seasonnum)
seasonid = self.kodi_db.addSeason(showid, seasonnum, item['Name'])
if item['LocationType'] != "Virtual":
# Create the reference in emby table

View File

@ -978,7 +978,7 @@ class Kodidb_Functions():
))
self.cursor.execute(query, (movieid,))
def addSeason(self, showid, seasonnumber):
def addSeason(self, showid, seasonnumber, season_name=None):
query = ' '.join((
@ -996,6 +996,10 @@ class Kodidb_Functions():
query = "INSERT INTO seasons(idSeason, idShow, season) values(?, ?, ?)"
self.cursor.execute(query, (seasonid, showid, seasonnumber))
if self.kodiversion in (16,17) and season_name is not None:
query = "UPDATE seasons SET name = ? WHERE idSeason = ?"
self.cursor.execute(query, (season_name, seasonid))
return seasonid
def addArtist(self, name, musicbrainz):