- for y in range(len(plugins)):
- list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][1], plugins[y][2]))
- if runAutostartPlugins:
- try: plugin.autostart()
- except: pass
- if runAutoendPlugins:
- try: plugin.autoend()
- except: pass
-
- #except:
- # print "Directory", path, "contains a faulty plugin"
- self.menuUpdate()
- return list
-
- def menuDelete(self):
- for menuEntry in self.menuEntries:
- menuupdater.delMenuItem(menuEntry[0][0], menuEntry[0][2], menuEntry[1], menuEntry[0][3])
-
- def menuUpdate(self):
- for menuEntry in self.menuEntries:
- menuupdater.addMenuItem(menuEntry[0][0], menuEntry[0][2], menuEntry[1], menuEntry[0][3])
-
- def runPlugin(self, plugin, session):
- #try:
- exec("import " + self.prefix + plugin[2] + ".plugin")
- print self.prefix + plugin[2] + ".plugin." + plugin[4]
- if plugin[3] == "screen":
- session.open(eval(self.prefix + plugin[2] + ".plugin." + plugin[4]))
- elif plugin[3] == "function":
- eval(self.prefix + plugin[2] + ".plugin." + plugin[4])(session)
- #except:
- #print "exec of plugin failed!"
+ def getPlugins(self, where):
+ """Get list of plugins in a specific category"""
+
+ if type(where) is not list:
+ where = [ where ]
+ res = [ ]
+ for x in where:
+ for p in self.plugins.get(x, [ ]):
+ res.append(p)
+ return res