def set_current_addon(self, addon_id, context_files): if(self._current_addon_id is None): logging.getLogger().info('going to load addon: <%s>' % addon_id) elif(self._current_addon_id == addon_id): return else: logging.getLogger().info('going to load addon: <%s> ; unload existing addon: <%s>' % (addon_id, self._current_addon_id)) del self._current_addon_id del self._current_addon self._current_addon_id = addon_id addon = system.get_addon(addon_id) addon_ver = addon.getAddonInfo('version') addon_path = addon.getAddonInfo('path') addon_data_path = addon.getAddonInfo('profile') logging.getLogger().info('set current addon: <%s>, version: <%s>, addon-path: <%s>, addon-data-path: <%s>' % (addon_id, addon_ver, addon_path, addon_data_path)) self._current_addon = XozeContext(context_files, addon, addon_path, addon_data_path)
def __initialize__(self, addon_id, conf={'webServiceEnabled':False}): system.show_busy_dialog() self._addon_id = addon_id self._addon = system.get_addon(addon_id) self._addon_ver = self._addon.getAddonInfo('version') self._addon_path = self._addon.getAddonInfo('path') self._addon_profile_path = self._addon.getAddonInfo('profile') self._configurations = conf self._current_addon = None self._current_addon_id = None self._service_publisher = None logging.getLogger().debug('context to be initialized...') self._xoze_context = XozeContext(self.get_conf('contextFiles'), self.get_addon(), self.get_addon_path(), self.get_addon_data_path()) logging.getLogger().debug('snapvideo to be initialized...') SnapVideo(context=self) # To initialize logging.getLogger().debug('web services to be initialized...') self._start_services()
def __initialize__(self, addon_id, conf={'webServiceEnabled': False}): system.show_busy_dialog() self._addon_id = addon_id self._addon = system.get_addon(addon_id) self._addon_ver = self._addon.getAddonInfo('version') self._addon_path = self._addon.getAddonInfo('path') self._addon_profile_path = self._addon.getAddonInfo('profile') self._configurations = conf self._current_addon = None self._current_addon_id = None self._service_publisher = None logging.getLogger().debug('context to be initialized...') self._xoze_context = XozeContext(self.get_conf('contextFiles'), self.get_addon(), self.get_addon_path(), self.get_addon_data_path()) logging.getLogger().debug('snapvideo to be initialized...') SnapVideo(context=self) # To initialize logging.getLogger().debug('web services to be initialized...') self._start_services()
def set_current_addon(self, addon_id, context_files): if (self._current_addon_id is None): logging.getLogger().info('going to load addon: <%s>' % addon_id) elif (self._current_addon_id == addon_id): return else: logging.getLogger().info( 'going to load addon: <%s> ; unload existing addon: <%s>' % (addon_id, self._current_addon_id)) del self._current_addon_id del self._current_addon self._current_addon_id = addon_id addon = system.get_addon(addon_id) addon_ver = addon.getAddonInfo('version') addon_path = addon.getAddonInfo('path') addon_data_path = addon.getAddonInfo('profile') logging.getLogger().info( 'set current addon: <%s>, version: <%s>, addon-path: <%s>, addon-data-path: <%s>' % (addon_id, addon_ver, addon_path, addon_data_path)) self._current_addon = XozeContext(context_files, addon, addon_path, addon_data_path)