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)
li.addContextMenuItems(items)
return li
- def log (self, msg, level=xbmc.LOGNOTICE):
+ def log (self, msg, level=xbmc.LOGDEBUG):
"""Adds a log entry to the Kodi log
Parameters
level : :obj:`int`
Kodi log level
"""
- if self.verb_log:
- if level == xbmc.LOGDEBUG and self.verb_log:
- level = xbmc.LOGNOTICE
- if isinstance(msg, unicode):
- msg = msg.encode('utf-8')
- xbmc.log('[%s] %s' % (self.plugin, msg.__str__()), level)
+ if isinstance(msg, unicode):
+ msg = msg.encode('utf-8')
+ xbmc.log('[%s] %s' % (self.plugin, msg.__str__()), level)
def get_local_string (self, string_id):
"""Returns the localized version of a string