def parseUrl(self): oInputParameterHandler = cInputParameterHandler() if (oInputParameterHandler.exist('function')): sFunction = oInputParameterHandler.getValue('function') else: cConfig().log('call load methode') sFunction = "load" if (oInputParameterHandler.exist('site')): sSiteName = oInputParameterHandler.getValue('site') cConfig().log('load site ' + sSiteName + ' and call function ' + sFunction) cStatistic().callStartPlugin(sSiteName) if (isHosterGui(sSiteName, sFunction) == True): return if (isGui(sSiteName, sFunction) == True): return if (isFav(sSiteName, sFunction) == True): return if (isHome(sSiteName, sFunction) == True): return #if (isAboutGui(sSiteName, sFunction) == True): #return #try: exec "import " + sSiteName + " as plugin" exec "plugin." + sFunction + "()" #except: # cConfig().log('could not load site: ' + sSiteName ) else: if (cConfig().getSetting("home-view") == 'true'): oHome = cHome() cAbout() exec "oHome." + sFunction + "()" return oGui = cGui() oPluginHandler = cPluginHandler() aPlugins = oPluginHandler.getAvailablePlugins() if (len(aPlugins) == 0): oGui.openSettings() oGui.updateDirectory() else: for aPlugin in aPlugins: oGuiElement = cGuiElement() oGuiElement.setTitle(aPlugin[0]) oGuiElement.setSiteName(aPlugin[1]) oGuiElement.setDescription(aPlugin[2]) oGuiElement.setFunction(sFunction) oGuiElement.setIcon("icon.png") oGui.addFolder(oGuiElement) oGui.setEndOfDirectory()
def parseUrl(self): oInputParameterHandler = cInputParameterHandler() if (oInputParameterHandler.exist('function')): sFunction = oInputParameterHandler.getValue('function') else: cConfig().log('call load methode') sFunction = "load" if (oInputParameterHandler.exist('site')): sSiteName = oInputParameterHandler.getValue('site') cConfig().log('load site ' + sSiteName + ' and call function ' + sFunction) cStatistic().callStartPlugin(sSiteName) if (isHosterGui(sSiteName, sFunction) == True): return if (isGui(sSiteName, sFunction) == True): return if (isFav(sSiteName, sFunction) == True): return if (isHome(sSiteName, sFunction) == True): return #if (isAboutGui(sSiteName, sFunction) == True): #return #try: exec "import " + sSiteName + " as plugin" exec "plugin."+ sFunction +"()" #except: # cConfig().log('could not load site: ' + sSiteName ) else: if (cConfig().getSetting("home-view") == 'true'): oHome = cHome() cAbout() exec "oHome."+ sFunction +"()" return oGui = cGui() oPluginHandler = cPluginHandler() aPlugins = oPluginHandler.getAvailablePlugins() if (len(aPlugins) == 0): oGui.openSettings() oGui.updateDirectory() else: for aPlugin in aPlugins: oGuiElement = cGuiElement() oGuiElement.setTitle(aPlugin[0]) oGuiElement.setSiteName(aPlugin[1]) oGuiElement.setDescription(aPlugin[2]) oGuiElement.setFunction(sFunction) oGuiElement.setIcon("icon.png") oGui.addFolder(oGuiElement) oGui.setEndOfDirectory()
def isHome(sSiteName, sFunction): if (sSiteName == 'cHome'): oHome = cHome() exec "oHome." + sFunction + "()" return True return False
def isHome(sSiteName, sFunction): if sSiteName == 'cHome': oHome = cHome() exec("oHome." + sFunction + "()") return True return False
def isHome(sSiteName, sFunction): if (sSiteName == 'cHome'): oHome = cHome() exec "oHome."+ sFunction +"()" return True return False
def parseUrl(self): #print sys.argv #print 'Debug 1' oInputParameterHandler = cInputParameterHandler() #print 'Debug 2' if (oInputParameterHandler.exist('function')): #print 'Debug 3' sFunction = oInputParameterHandler.getValue('function') else: #print 'Debug 4' cConfig().log('call load methode') sFunction = "load" #print 'Debug 5' if (sFunction == 'DoNothing'): return if (oInputParameterHandler.exist('site')): sSiteName = oInputParameterHandler.getValue('site') cConfig().log('load site ' + sSiteName + ' and call function ' + sFunction) cStatistic().callStartPlugin(sSiteName) if (isHosterGui(sSiteName, sFunction) == True): return if (isGui(sSiteName, sFunction) == True): return if (isFav(sSiteName, sFunction) == True): return if (isLibrary(sSiteName, sFunction) == True): return if (isDl(sSiteName, sFunction) == True): return if (isHome(sSiteName, sFunction) == True): return #if (isAboutGui(sSiteName, sFunction) == True): #return #try: exec "from resources.sites import " + sSiteName + " as plugin" exec "plugin." + sFunction + "()" #except: # cConfig().log('could not load site: ' + sSiteName ) else: if (cConfig().getSetting("home-view") == 'true'): oHome = cHome() cAbout() exec "oHome." + sFunction + "()" return oGui = cGui() oPluginHandler = cPluginHandler() aPlugins = oPluginHandler.getAvailablePlugins() if (len(aPlugins) == 0): oGui.openSettings() oGui.updateDirectory() else: for aPlugin in aPlugins: # oGuiElement = cGuiElement() # oGuiElement.setTitle(aPlugin[0]) # oGuiElement.setSiteName(aPlugin[1]) # oGuiElement.setDescription(aPlugin[2]) # oGuiElement.setFunction(sFunction) # oGuiElement.setIcon("icon.png") # oGui.addFolder(oGuiElement) oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', 'test') oGui.addDir(aPlugin[1], sFunction, aPlugin[0], 'icon.png', oOutputParameterHandler) oGui.setEndOfDirectory()
def parseUrl(self): #print sys.argv #print 'Debug 1' oInputParameterHandler = cInputParameterHandler() #print 'Debug 2' if (oInputParameterHandler.exist('function')): #print 'Debug 3' sFunction = oInputParameterHandler.getValue('function') else: #print 'Debug 4' cConfig().log('call load methode') sFunction = "load" #print 'Debug 5' if (sFunction=='DoNothing'): return if (oInputParameterHandler.exist('site')): sSiteName = oInputParameterHandler.getValue('site') cConfig().log('load site ' + sSiteName + ' and call function ' + sFunction) cStatistic().callStartPlugin(sSiteName) if (isHosterGui(sSiteName, sFunction) == True): return if (isGui(sSiteName, sFunction) == True): return if (isFav(sSiteName, sFunction) == True): return if (isLibrary(sSiteName, sFunction) == True): return if (isDl(sSiteName, sFunction) == True): return if (isHome(sSiteName, sFunction) == True): return #if (isAboutGui(sSiteName, sFunction) == True): #return #try: exec "from resources.sites import " + sSiteName + " as plugin" exec "plugin."+ sFunction +"()" #except: # cConfig().log('could not load site: ' + sSiteName ) else: try: from resources.lib.about import cAbout cAbout().getUpdate() #exec "from resources.lib.about import cAbout as plugin" #exec "plugin.getUpdate()" except: pass if (cConfig().getSetting("home-view") == 'true'): oHome = cHome() exec "oHome."+ sFunction +"()" return oGui = cGui() oPluginHandler = cPluginHandler() aPlugins = oPluginHandler.getAvailablePlugins() if (len(aPlugins) == 0): oGui.openSettings() oGui.updateDirectory() else: for aPlugin in aPlugins: # oGuiElement = cGuiElement() # oGuiElement.setTitle(aPlugin[0]) # oGuiElement.setSiteName(aPlugin[1]) # oGuiElement.setDescription(aPlugin[2]) # oGuiElement.setFunction(sFunction) # oGuiElement.setIcon("icon.png") # oGui.addFolder(oGuiElement) oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', 'test') oGui.addDir(aPlugin[1], sFunction, aPlugin[0], 'icon.png', oOutputParameterHandler) oGui.setEndOfDirectory()
def parseUrl(self): # print sys.argv # print 'Debug 1' oInputParameterHandler = cInputParameterHandler() # print 'Debug 2' if oInputParameterHandler.exist("function"): # print 'Debug 3' sFunction = oInputParameterHandler.getValue("function") else: # print 'Debug 4' cConfig().log("call load methode") sFunction = "load" # print 'Debug 5' if sFunction == "DoNothing": return if oInputParameterHandler.exist("site"): sSiteName = oInputParameterHandler.getValue("site") cConfig().log("load site " + sSiteName + " and call function " + sFunction) cStatistic().callStartPlugin(sSiteName) if isHosterGui(sSiteName, sFunction) == True: return if isGui(sSiteName, sFunction) == True: return if isFav(sSiteName, sFunction) == True: return if isLibrary(sSiteName, sFunction) == True: return if isDl(sSiteName, sFunction) == True: return if isHome(sSiteName, sFunction) == True: return # if (isAboutGui(sSiteName, sFunction) == True): # return # try: exec "from resources.sites import " + sSiteName + " as plugin" exec "plugin." + sFunction + "()" # except: # cConfig().log('could not load site: ' + sSiteName ) else: if cConfig().getSetting("home-view") == "true": oHome = cHome() # cAbout() exec "oHome." + sFunction + "()" return oGui = cGui() oPluginHandler = cPluginHandler() aPlugins = oPluginHandler.getAvailablePlugins() if len(aPlugins) == 0: oGui.openSettings() oGui.updateDirectory() else: for aPlugin in aPlugins: # oGuiElement = cGuiElement() # oGuiElement.setTitle(aPlugin[0]) # oGuiElement.setSiteName(aPlugin[1]) # oGuiElement.setDescription(aPlugin[2]) # oGuiElement.setFunction(sFunction) # oGuiElement.setIcon("icon.png") # oGui.addFolder(oGuiElement) oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter("siteUrl", "test") oGui.addDir(aPlugin[1], sFunction, aPlugin[0], "icon.png", oOutputParameterHandler) oGui.setEndOfDirectory()