diff options
| author | acid-burn <acidburn@opendreambox.org> | 2009-08-27 17:38:58 +0200 |
|---|---|---|
| committer | acid-burn <acidburn@opendreambox.org> | 2009-08-27 17:38:58 +0200 |
| commit | 1b69c6d4604804d03cc4ac3cccaa16b7ae70ccad (patch) | |
| tree | 18be7ddfe86214af186ed909621b7958c130413b /lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py | |
| parent | 17ce0c30d39a197c49c9a2945e4e5cff53317aa4 (diff) | |
| download | enigma2-1b69c6d4604804d03cc4ac3cccaa16b7ae70ccad.tar.gz enigma2-1b69c6d4604804d03cc4ac3cccaa16b7ae70ccad.zip | |
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.
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py')
| -rwxr-xr-x | lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py | 29 |
1 files changed, 29 insertions, 0 deletions
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 + |
