add plugin weight to PluginDescriptor... so the plugin start order can be changed now
[enigma2.git] / lib / python / Components / PluginComponent.py
index 93b089001630cf5d4841e29cf21c9447b6a885e0..a713c3b42dd721d4664c70743a5532db7c81d664 100755 (executable)
@@ -122,13 +122,14 @@ class PluginComponent:
 
                for x in where:
                        res.extend(self.plugins.get(x, [ ]))
-
-               return  res
+               res.sort(key=lambda x:x.weight)
+               return res
 
        def getPluginsForMenu(self, menuid):
                res = [ ]
                for p in self.getPlugins(PluginDescriptor.WHERE_MENU):
                        res += p(menuid)
+               res.sort(key=lambda x:x.weight)
                return res
 
        def clearPluginList(self):