PluginComponent: fix setting wakeuptime from plugin
[enigma2.git] / lib / python / Components / PluginComponent.py
index 6e357cd0431aa3367f10ad4a71644625b7e37ab4..c91d6ad5a3f3b650d76a44a95290cf452a05fa1f 100644 (file)
@@ -96,9 +96,9 @@ class PluginComponent:
                res = [ ]
 
                for x in where:
-                       for p in self.plugins.get(x, [ ]):
-                               res.append(p)
-               return res
+                       res.extend(self.plugins.get(x, [ ]))
+
+               return  res
 
        def getPluginsForMenu(self, menuid):
                res = [ ]
@@ -121,7 +121,7 @@ class PluginComponent:
                wakeup = -1
                for p in self.pluginList:
                        current = p.getWakeupTime()
-                       if current > -1 and wakeup < current:
+                       if current > -1 and (wakeup > current or wakeup == -1):
                                wakeup = current
                return int(wakeup)