From a5f1e3120f21c42c1a6e217dc26bb943b93426b2 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Tue, 10 Jan 2006 16:08:35 +0000 Subject: autostart and autoend functions are now called on the start and the end of enigma2 execution plugins supporting this functionality must have a function autostart and/or autoend in their code --- lib/python/Components/PluginComponent.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/python/Components/PluginComponent.py') diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py index 67373ea7..10e1b59d 100644 --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -12,7 +12,7 @@ class PluginComponent: def setPluginPrefix(self, prefix): self.prefix = prefix - def getPluginList(self): + def getPluginList(self, runAutostartPlugins=False, runAutoendPlugins=False): list = [] dir = os.listdir(resolveFilename(SCOPE_PLUGINS)) self.menuDelete() @@ -36,6 +36,13 @@ class PluginComponent: pass list.append((picturepath, pluginname , x)) + if runAutostartPlugins: + try: plugin.autostart() + except: pass + if runAutoendPlugins: + try: plugin.autoend() + except: pass + except: print "Directory", path, "contains a faulty plugin" self.menuUpdate() -- cgit v1.2.3