1 from Screen import Screen
2 from Components.ActionMap import ActionMap
3 from Components.Sources.StaticText import StaticText
4 from Components.Harddisk import harddiskmanager
5 from Components.NimManager import nimmanager
6 from Components.About import about
8 from Tools.DreamboxHardware import getFPVersion
11 def __init__(self, session):
12 Screen.__init__(self, session)
14 self["EnigmaVersion"] = StaticText("Version: " + about.getEnigmaVersionString())
15 self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())
17 self["TunerHeader"] = StaticText(_("Detected NIMs:"))
19 fp_version = getFPVersion()
20 if fp_version is None:
23 fp_version = _("Frontprocessor version: %d") % fp_version
25 self["FPVersion"] = StaticText(fp_version)
27 nims = nimmanager.nimList()
29 for count in (0, 1, 2, 3):
31 self["Tuner" + str(count)] = StaticText(nims[count])
33 self["Tuner" + str(count)] = StaticText("")
38 while count < len(nims):
39 data = nims[count].split(":")
40 idx = data[0].strip('Tuner').strip()
41 desc = data[1].strip()
42 if desc_list and desc_list[cur_idx]['desc'] == desc:
43 desc_list[cur_idx]['end'] = idx
45 desc_list.append({'desc' : desc, 'start' : idx, 'end' : idx})
49 for count in (0, 1, 2, 3):
50 if count < len(desc_list):
51 if desc_list[count]['start'] == desc_list[count]['end']:
52 text = "Tuner %s: %s" % (desc_list[count]['start'], desc_list[count]['desc'])
54 text = "Tuner %s-%s: %s" % (desc_list[count]['start'], desc_list[count]['end'], desc_list[count]['desc'])
58 self["Tuner" + str(count)] = StaticText(text)
60 self["HDDHeader"] = StaticText(_("Detected HDD:"))
61 hddlist = harddiskmanager.HDDList()
62 hdd = hddlist and hddlist[0][1] or None
63 if hdd is not None and hdd.model() != "":
64 self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
66 self["hddA"] = StaticText(_("none"))
68 self["actions"] = ActionMap(["SetupActions", "ColorActions"],