Enigma2: add CleanupWizard to SystemPlugins and Enigma2 build.
[enigma2.git] / lib / python / Plugins / SystemPlugins / CleanupWizard / plugin.py
1 from Screens.Screen import Screen
2 from Plugins.Plugin import PluginDescriptor
3 from Components.PluginComponent import plugins
4 from Components.config import config
5 from CleanupWizard import checkFreeSpaceAvailable
6
7 freeSpace = checkFreeSpaceAvailable()
8 print "[CleanupWizard] freeSpaceAvailable-->",freeSpace
9
10
11 if freeSpace is None:
12         internalMemoryExceeded = 0
13 elif int(freeSpace) <= 12048:
14         internalMemoryExceeded = 1
15 else:
16         internalMemoryExceeded = 0
17
18
19 def CleanupWizard(*args, **kwargs):
20         from CleanupWizard import CleanupWizard
21         return CleanupWizard(*args, **kwargs)
22
23 def Plugins(**kwargs):
24         list = []
25         if not config.misc.firstrun.value:
26                 if internalMemoryExceeded:
27                         list.append(PluginDescriptor(name=_("Cleanup Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(1, CleanupWizard)))
28         return list
29