Exemplo n.º 1
0
 def __init__(self, function_name):
     super(GenericJasonScraper, self).__init__()
     server = server_factory()
     try:
         json = getattr(server, function_name)()
     except AttributeError:
         self._log('Invalid function name')
         item = xbmcgui.ListItem('No videos.... Try upgrading or come back later')
         Directory().addFile(item, util.currentPath(['..']))
     else:
         self.processJson(json)
Exemplo n.º 2
0
 def createFolder(self, name, path, info = None, is_plugin_subfolder = True):
     """Create new folder in directory list
     
     Create and add a folder to the current directory and assume that it is 
     a plugin of the current folder
     
     """
     if is_plugin_subfolder:
         path = util.currentPath(path)
     info = info or {}
     info.update({'label' : name})
     self.addFolder(Factory.folder(info), path)
     return self