for index in seasons_sorted:
for season_id in season_list:
season = season_list[season_id]
- if int(season['shortName'].split(' ')[1]) == index:
+ if int(season['id']) == index:
li = xbmcgui.ListItem(label=season['text'])
# add some art to the item
li = self._generate_art_info(entry=season, li=li)
# sort seasons by index by default (they´re coming back unsorted from the api)
seasons_sorted = []
for season_id in season_list:
- seasons_sorted.append(int(season_list[season_id]['shortName'].split(' ')[1]))
+ print '---Le DEBUG--'
+ print season_list[season_id]
+ print '---Le DEBUG--'
+ seasons_sorted.append(int(season_list[season_id]['id']))
seasons_sorted.sort()
return self.kodi_helper.build_season_listing(seasons_sorted=seasons_sorted, season_list=season_list, build_url=self.build_url)