patch by Moritz Venn: allow plugins to provide a Wakeup-Time
[enigma2.git] / lib / python / Components / PluginComponent.py
index 44fe896a4e4884f3c88ca63866bc5a778b5fe272..818ea583c46a484723e276ae06ffbb757074625c 100644 (file)
@@ -101,7 +101,7 @@ class PluginComponent:
 
        def getPluginsForMenu(self, menuid):
                res = [ ]
-               for p in self.getPlugins(PluginDescriptor.WHERE_SETUP):
+               for p in self.getPlugins(PluginDescriptor.WHERE_MENU):
                        res += p(menuid)
                return res
 
@@ -116,4 +116,12 @@ class PluginComponent:
        def resetWarnings(self):
                self.warnings = [ ]
 
+       def getNextWakeupTime(self):
+               wakeup = -1
+               for p in self.pluginList:
+                       current = p.getWakeupTime()
+                       if current > -1 and wakeup < current:
+                               wakeup = current
+               return int(wakeup)
+
 plugins = PluginComponent()