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)
13 self["NetworkHeader"] = StaticText(_("Network:"))
14 self["Network"] = StaticText(about.getNetworkInfo())
16 self["EnigmaVersion"] = StaticText("Version: " + about.getEnigmaVersionString())
17 self["ImageVersion"] = StaticText("Image: " + about.getImageVersionString())
19 self["TunerHeader"] = StaticText(_("Detected NIMs:"))
21 fp_version = getFPVersion()
22 if fp_version is None:
25 fp_version = _("Frontprocessor version: %d") % fp_version
27 self["FPVersion"] = StaticText(fp_version)
29 nims = nimmanager.nimList()
31 for count in (0, 1, 2, 3):
33 self["Tuner" + str(count)] = StaticText(nims[count])
35 self["Tuner" + str(count)] = StaticText("")
40 while count < len(nims):
41 data = nims[count].split(":")
42 idx = data[0].strip('Tuner').strip()
43 desc = data[1].strip()
44 if desc_list and desc_list[cur_idx]['desc'] == desc:
45 desc_list[cur_idx]['end'] = idx
47 desc_list.append({'desc' : desc, 'start' : idx, 'end' : idx})
51 for count in (0, 1, 2, 3):
52 if count < len(desc_list):
53 if desc_list[count]['start'] == desc_list[count]['end']:
54 text = "Tuner %s: %s" % (desc_list[count]['start'], desc_list[count]['desc'])
56 text = "Tuner %s-%s: %s" % (desc_list[count]['start'], desc_list[count]['end'], desc_list[count]['desc'])
60 self["Tuner" + str(count)] = StaticText(text)
62 self["HDDHeader"] = StaticText(_("Detected HDD:"))
63 hddlist = harddiskmanager.HDDList()
64 hdd = hddlist and hddlist[0][1] or None
65 if hdd is not None and hdd.model() != "":
66 self["hddA"] = StaticText(_("%s\n(%s, %d MB free)") % (hdd.model(), hdd.capacity(),hdd.free()))
68 self["hddA"] = StaticText(_("none"))
70 self["actions"] = ActionMap(["SetupActions", "ColorActions"],