X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FPluginComponent.py;h=e5194b28c9922fd9d3711da69dd6dc67bd4c3959;hb=1b1339127ce152097492d899e401e3c6a2438f2c;hp=60f767380cbe653baa25b86e53d404369b170210;hpb=367c104e1d3716861c87905575d0bc729342d79c;p=vuplus_dvbapp diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py index 60f7673..e5194b2 100755 --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -21,21 +21,14 @@ class PluginComponent: self.prefix = prefix def addPlugin(self, plugin): - if self.firstRun: + if self.firstRun or plugin.needsRestart is False: self.pluginList.append(plugin) for x in plugin.where: self.plugins.setdefault(x, []).append(plugin) if x == PluginDescriptor.WHERE_AUTOSTART: plugin(reason=0) else: - if plugin.needsRestart is False: - self.pluginList.append(plugin) - for x in plugin.where: - self.plugins.setdefault(x, []).append(plugin) - if x == PluginDescriptor.WHERE_AUTOSTART: - plugin(reason=0) - else: - self.restartRequired = True + self.restartRequired = True def removePlugin(self, plugin): self.pluginList.remove(plugin) @@ -131,6 +124,8 @@ class PluginComponent: def clearPluginList(self): self.pluginList = [] self.plugins = {} + self.firstRun = True + self.restartRequired = False def shutdown(self): for p in self.pluginList[:]: