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