def __getCachedSource(self): try: data = getFileContent(self.cachedSourcePath) data = enc.smart_unicode(data) except: #data = data.decode('utf-8') pass return data
def install(self, filename): destination = xbmc.translatePath(INSTALL_DIR) files = self.extract(filename, destination) if files: addonXml = filter(lambda x: x.filename.endswith('addon.xml'), files) if addonXml: path = os.path.join(destination, addonXml[0].filename) content = getFileContent(path) addonId = findall(content, '<addon id="([^"]+)"') if addonId: return addonId[0] return None
def getLastUrl(self): return getFileContent(self.lastUrlPath)
def __getCachedSource(self): try: data = getFileContent(self.cachedSourcePath) except: pass return data
def getLastUrl(self): url = getFileContent(self.lastUrlPath) return url
def getLastUrl(self): url = getFileContent(self.lastUrlPath) return url.decode('utf-8')
def __getCachedSource(self): data = enc.smart_unicode(getFileContent(self.cachedSourcePath)) return data