From 81ed3b8706eb034f04e9db87fbcfd9dbba39e125 Mon Sep 17 00:00:00 2001 From: acid-burn Date: Mon, 7 Feb 2011 21:52:19 +0100 Subject: Enigma2-Plugins: implement needsRestart=True for plugins that need a enigma2 restart after installation. refs #670 --- lib/python/Plugins/Extensions/DVDBurn/plugin.py | 4 ++-- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 4 ++-- lib/python/Plugins/Extensions/MediaScanner/plugin.py | 6 +++--- lib/python/Plugins/Extensions/Modem/plugin.py | 2 +- lib/python/Plugins/Extensions/SocketMMI/plugin.py | 7 ++++--- lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) mode change 100644 => 100755 lib/python/Plugins/Extensions/DVDBurn/plugin.py mode change 100644 => 100755 lib/python/Plugins/Extensions/Modem/plugin.py mode change 100644 => 100755 lib/python/Plugins/Extensions/SocketMMI/plugin.py mode change 100644 => 100755 lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py (limited to 'lib/python/Plugins/Extensions') diff --git a/lib/python/Plugins/Extensions/DVDBurn/plugin.py b/lib/python/Plugins/Extensions/DVDBurn/plugin.py old mode 100644 new mode 100755 index bd856b47..f5d2fa62 --- a/lib/python/Plugins/Extensions/DVDBurn/plugin.py +++ b/lib/python/Plugins/Extensions/DVDBurn/plugin.py @@ -13,5 +13,5 @@ def main_add(session, service, **kwargs): def Plugins(**kwargs): descr = _("Burn to DVD") - return [PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_MOVIELIST, fnc=main_add, icon="dvdburn.png"), - PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main, icon="dvdburn.png") ] + return [PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_MOVIELIST, needsRestart = True, fnc=main_add, icon="dvdburn.png"), + PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = True, fnc=main, icon="dvdburn.png") ] diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index e1ab3ef4..eaf8db64 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -775,5 +775,5 @@ def filescan(**kwargs): )] def Plugins(**kwargs): - return [PluginDescriptor(name = "DVDPlayer", description = "Play DVDs", where = PluginDescriptor.WHERE_MENU, fnc = menu), - PluginDescriptor(where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)] + return [PluginDescriptor(name = "DVDPlayer", description = "Play DVDs", where = PluginDescriptor.WHERE_MENU, needsRestart = True, fnc = menu), + PluginDescriptor(where = PluginDescriptor.WHERE_FILESCAN, needsRestart = True, fnc = filescan)] diff --git a/lib/python/Plugins/Extensions/MediaScanner/plugin.py b/lib/python/Plugins/Extensions/MediaScanner/plugin.py index 0cefa353..76bbb26a 100755 --- a/lib/python/Plugins/Extensions/MediaScanner/plugin.py +++ b/lib/python/Plugins/Extensions/MediaScanner/plugin.py @@ -91,8 +91,8 @@ def autostart(reason, **kwargs): def Plugins(**kwargs): return [ - PluginDescriptor(name="MediaScanner", description=_("Scan Files..."), where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main), + PluginDescriptor(name="MediaScanner", description=_("Scan Files..."), where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = True, fnc=main), # PluginDescriptor(where = PluginDescriptor.WHERE_MENU, fnc=menuHook), - PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart), - PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart) + PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = True, fnc = sessionstart), + PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = True, fnc = autostart) ] diff --git a/lib/python/Plugins/Extensions/Modem/plugin.py b/lib/python/Plugins/Extensions/Modem/plugin.py old mode 100644 new mode 100755 index e57e4f51..0b397c18 --- a/lib/python/Plugins/Extensions/Modem/plugin.py +++ b/lib/python/Plugins/Extensions/Modem/plugin.py @@ -280,4 +280,4 @@ def main(session, **kwargs): session.open(ModemSetup) def Plugins(**kwargs): - return PluginDescriptor(name="Modem", description="plugin to connect to internet via builtin modem", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main) + return PluginDescriptor(name="Modem", description="plugin to connect to internet via builtin modem", where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=main) diff --git a/lib/python/Plugins/Extensions/SocketMMI/plugin.py b/lib/python/Plugins/Extensions/SocketMMI/plugin.py old mode 100644 new mode 100755 index 387c8306..568cde2a --- a/lib/python/Plugins/Extensions/SocketMMI/plugin.py +++ b/lib/python/Plugins/Extensions/SocketMMI/plugin.py @@ -22,6 +22,7 @@ def autostart(reason, **kwargs): socketHandler = SocketMMIMessageHandler() def Plugins(**kwargs): - return [ PluginDescriptor(name = "SocketMMI", description = _("Python frontend for /tmp/mmi.socket"), where = PluginDescriptor.WHERE_MENU, fnc = menu), - PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, fnc = sessionstart), - PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart) ] + return [ PluginDescriptor(name = "SocketMMI", description = _("Python frontend for /tmp/mmi.socket"), where = PluginDescriptor.WHERE_MENU, needsRestart = True, fnc = menu), + PluginDescriptor(where = PluginDescriptor.WHERE_SESSIONSTART, needsRestart = True, fnc = sessionstart), + PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, needsRestart = True, fnc = autostart) ] + diff --git a/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py b/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py old mode 100644 new mode 100755 index 05085ead..e124ffd2 --- a/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py +++ b/lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py @@ -17,7 +17,7 @@ def getPlugins(): for x in dir: if x[-3:] == "cfg": params = getPluginParams(x) - pluginlist.append(PluginDescriptor(name=params["name"], description=params["desc"], where = PluginDescriptor.WHERE_PLUGINMENU, icon="tuxbox.png", fnc=boundFunction(main, plugin=x))) + pluginlist.append(PluginDescriptor(name=params["name"], description=params["desc"], where = PluginDescriptor.WHERE_PLUGINMENU, icon="tuxbox.png", needsRestart = True, fnc=boundFunction(main, plugin=x))) return pluginlist -- cgit v1.2.3