From 1b69c6d4604804d03cc4ac3cccaa16b7ae70ccad Mon Sep 17 00:00:00 2001 From: acid-burn Date: Thu, 27 Aug 2009 17:38:58 +0200 Subject: Enigma2: add CleanupWizard to SystemPlugins and Enigma2 build. - The CleanupWizard informs you on system boot if your avalalble internal memory (flash) has droppen below 2MB and allows the removal of enigma2-plugins and skins to cleanup the internal memory (flash) on bootup. --- .../Plugins/SystemPlugins/CleanupWizard/plugin.py | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py (limited to 'lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py') diff --git a/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py b/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py new file mode 100755 index 00000000..c1af50d2 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py @@ -0,0 +1,29 @@ +from Screens.Screen import Screen +from Plugins.Plugin import PluginDescriptor +from Components.PluginComponent import plugins +from Components.config import config +from CleanupWizard import checkFreeSpaceAvailable + +freeSpace = checkFreeSpaceAvailable() +print "[CleanupWizard] freeSpaceAvailable-->",freeSpace + + +if freeSpace is None: + internalMemoryExceeded = 0 +elif int(freeSpace) <= 12048: + internalMemoryExceeded = 1 +else: + internalMemoryExceeded = 0 + + +def CleanupWizard(*args, **kwargs): + from CleanupWizard import CleanupWizard + return CleanupWizard(*args, **kwargs) + +def Plugins(**kwargs): + list = [] + if not config.misc.firstrun.value: + if internalMemoryExceeded: + list.append(PluginDescriptor(name=_("Cleanup Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(1, CleanupWizard))) + return list + -- cgit v1.2.3