Example #1
0
    def setup(self, config):

        self.xbmc = XBMCRemote(config['server'], config['username'],
                               config['password'])

        self.update_pending = False
        self.update_type = None

        self.clean_pending = False
        self.clean_type = None

        if not 'autoupdate' in config or config['autoupdate']:
            self.application.add_event_listener('library_file_added',
                                                self.media_added)

        if 'autoclean' in config and config['autoclean']:
            self.application.add_event_listener('library_file_removed',
                                                self.media_removed)