def __init__(self): # initiate imdb parser self.IMDbFetcher = IMDbClient.IMDbFetcher() self.parser = RSSParser() self.sabnzbd = SABnzbdActions() #fetch settings from settings.xml self._get_settings() self._parse_argv() # get the list if hasattr(self.args, 'download_nzb'): url, title, id, cat = self.args.download_nzb.split('!?!') # get the list self.sabnzbd._download_nzb(url, title=title, category=cat) elif hasattr(self.args, 'sabnzbd_action'): url, title, id, cat = self.args.sabnzbd_action.split('!?!') # get the list self.sabnzbd._sabnzbd_action(id) else: ok = self._show_categories() # send notification we're finished, successfully or unsuccessfully xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=ok)