aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/CleanupWizard/plugin.py
blob: c1af50d27fb3385ec1a83b51257ff34ce31896de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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