def loadTurtleMap(self): turtle_filepath = AddonUtils.getCompleteFilePath( self.addonPath, 'config', 'turtle.xml') if not AddonUtils.doesFileExist(turtle_filepath): turtle_filepath = AddonUtils.getCompleteFilePath( self.turtle_addonPath, 'lib/config', 'turtle.xml') return AddonUtils.getBeautifulSoupObj(turtle_filepath)
def __initializeSnappers(): snapper_filepath = AddonUtils.getCompleteFilePath(Container().getAddonContext().addonPath, 'snapvideo', 'snappers.xml') if not AddonUtils.doesFileExist(snapper_filepath): snapper_filepath = AddonUtils.getCompleteFilePath(Container().getAddonContext().turtle_addonPath, 'lib/snapvideo', 'snappers.xml') global snappers if snappers is not None: return snappers snappers = [] Logger.logDebug('Loading snappers.xml from path... ' + snapper_filepath) snappers_xml = AddonUtils.getBeautifulSoupObj(snapper_filepath) for snapperTag in snappers_xml.findAll('snapper', attrs={'enabled':'true'}): snappers.append(Snapper(snapperTag)) return snappers
def __initialize__(self, addon_id): #Addon information self.addon = xbmcaddon.Addon(id=addon_id) self.addonPath = self.addon.getAddonInfo('path') self.addonProfile = self.addon.getAddonInfo('profile') self.turtle_addon = xbmcaddon.Addon(id='script.module.turtle') self.turtle_addonPath = self.turtle_addon.getAddonInfo('path') self.turtle_addonProfile = self.turtle_addon.getAddonInfo('profile') turtle_filepath = AddonUtils.getCompleteFilePath(self.addonPath, 'config', 'turtle.xml') if not AddonUtils.doesFileExist(turtle_filepath): turtle_filepath = AddonUtils.getCompleteFilePath(self.turtle_addonPath, 'lib/config', 'turtle.xml') self.turtle_map = AddonUtils.getBeautifulSoupObj(turtle_filepath)
def loadTurtleMap(self): turtle_filepath = AddonUtils.getCompleteFilePath(self.addonPath, 'config', 'turtle.xml') if not AddonUtils.doesFileExist(turtle_filepath): turtle_filepath = AddonUtils.getCompleteFilePath(self.turtle_addonPath, 'lib/config', 'turtle.xml') return AddonUtils.getBeautifulSoupObj(turtle_filepath)