From 39ac41647eb2dde0cafff0781d5d3a63b373a24c Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 30 Dec 2015 03:21:49 -0600 Subject: [PATCH] Fix AirsAfterSeason --- resources/lib/itemtypes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 6a9f7904..cab6fe3c 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -1504,8 +1504,12 @@ class TVShows(Items): season = -1 # Specials ordering within season - airsBeforeSeason = item.get('AirsBeforeSeasonNumber', "-1") - airsBeforeEpisode = item.get('AirsBeforeEpisodeNumber', "-1") + if item.get('AirsAfterSeasonNumber'): + airsBeforeSeason = item['AirsAfterSeasonNumber'] + airsBeforeEpisode = 4096 # Kodi default number for afterseason ordering + else: + airsBeforeSeason = item.get('AirsBeforeSeasonNumber', "-1") + airsBeforeEpisode = item.get('AirsBeforeEpisodeNumber', "-1") # Append multi episodes to title if item.get('IndexNumberEnd'):