mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Add artwork to All-season
Turns out All-season is -1.
This commit is contained in:
parent
494e326413
commit
aa156a5a63
1 changed files with 16 additions and 1 deletions
|
@ -764,7 +764,22 @@ class WriteKodiVideoDB():
|
|||
self.addOrUpdateArt(imageUrl, seasonid, "season", "poster", cursor)
|
||||
|
||||
imageUrl = API().getArtwork(season, "Banner")
|
||||
self.addOrUpdateArt(imageUrl, seasonid, "season", "banner", cursor)
|
||||
self.addOrUpdateArt(imageUrl, seasonid, "season", "banner", cursor)
|
||||
# Set All season poster
|
||||
MBitem = ReadEmbyDB().getFullItem(embyTvShowId)
|
||||
seasonNum = -1
|
||||
cursor.execute("SELECT idSeason as seasonid FROM seasons WHERE idShow = ? and season = ?", (kodiTvShowId, seasonNum))
|
||||
result = cursor.fetchone()
|
||||
if result == None:
|
||||
# Create the all-season
|
||||
cursor.execute("select coalesce(max(idSeason),0) as seasonid from seasons")
|
||||
seasonid = cursor.fetchone()[0]
|
||||
seasonid = seasonid + 1
|
||||
cursor.execute("INSERT into seasons(idSeason, idShow, season) values(?, ?, ?)", (seasonid, kodiTvShowId, seasonNum))
|
||||
else:
|
||||
seasonid = result[0]
|
||||
imageUrl = API().getArtwork(MBitem, "Primary")
|
||||
self.addOrUpdateArt(imageUrl, seasonid, "season", "poster", cursor)
|
||||
|
||||
def addOrUpdateArt(self, imageUrl, kodiId, mediaType, imageType, cursor):
|
||||
updateDone = False
|
||||
|
|
Loading…
Reference in a new issue