- for y in range(len(plugins)):
- if len(plugins[y]) < 5:
- list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][2], plugins[y][3], None, plugins[y][1]))
- else:
- list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][2], plugins[y][3], plugins[y][4], plugins[y][1]))
- 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][1], menuEntry[0][2], menuEntry[1], menuEntry[0][3])
+ 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