diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-01-10 16:08:35 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-01-10 16:08:35 +0000 |
| commit | a5f1e3120f21c42c1a6e217dc26bb943b93426b2 (patch) | |
| tree | 8aeeaa5373099247656c7303ee16eec251417dfa /lib/python/Components/PluginComponent.py | |
| parent | 2d470a436a60b917a27c2055952a0a24374b994c (diff) | |
| download | enigma2-a5f1e3120f21c42c1a6e217dc26bb943b93426b2.tar.gz enigma2-a5f1e3120f21c42c1a6e217dc26bb943b93426b2.zip | |
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
Diffstat (limited to 'lib/python/Components/PluginComponent.py')
| -rw-r--r-- | lib/python/Components/PluginComponent.py | 9 |
1 files changed, 8 insertions, 1 deletions
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() |
