Ejemplo n.º 1
0
 def __getCachedSource(self):
     try:
         data = getFileContent(self.cachedSourcePath)
         data = enc.smart_unicode(data)
     except:
         #data = data.decode('utf-8')
         pass
     return data
 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
Ejemplo n.º 4
0
 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
Ejemplo n.º 5
0
 def getLastUrl(self):
     return getFileContent(self.lastUrlPath)
Ejemplo n.º 6
0
 def __getCachedSource(self):
     try:
         data = getFileContent(self.cachedSourcePath)
     except:
         pass
     return data
 def getLastUrl(self):
     url = getFileContent(self.lastUrlPath)
     return url
Ejemplo n.º 8
0
 def getLastUrl(self):
     return getFileContent(self.lastUrlPath)
Ejemplo n.º 9
0
 def __getCachedSource(self):
     try:
         data = getFileContent(self.cachedSourcePath)
     except:
         pass
     return data
Ejemplo n.º 10
0
 def getLastUrl(self):
     url = getFileContent(self.lastUrlPath)
     return url.decode('utf-8')
Ejemplo n.º 11
0
 def getLastUrl(self):
     url = getFileContent(self.lastUrlPath)
     return url
Ejemplo n.º 12
0
 def __getCachedSource(self):
     data = enc.smart_unicode(getFileContent(self.cachedSourcePath))
     return data