add Special TV Show mapping to Season 100 and use Delete from table for DB reset

This commit is contained in:
shaun 2015-04-12 18:34:00 +10:00
commit 9d2d2788b2
6 changed files with 56 additions and 33 deletions

View file

@ -1087,6 +1087,10 @@ class WriteKodiDB():
seasonid = seasonid + 1
cursor.execute("INSERT into seasons(idSeason, idShow, season) values(?, ?, ?)", (seasonid, tvshowid, season["IndexNumber"]))
# this is for handling specials as season 100, it allows art to be correctly set form the season 0 Emby data
if(season["IndexNumber"] == 100):
season["IndexNumber"] = 0
#insert artwork
if API().getArtwork(season, "Thumb") != "":
cursor.execute("INSERT into art(media_id, media_type, type, url) values(?, ?, ?, ?)", (seasonid,"season","landscape",API().getArtwork(season, "Thumb")))