add space
[enigma2.git] / lib / python / Screens / Satconfig.py
1 from enigma import eDVBDB
2 from Screen import Screen
3 from Components.SystemInfo import SystemInfo
4 from Components.ActionMap import ActionMap
5 from Components.ConfigList import ConfigListScreen
6 from Components.MenuList import MenuList
7 from Components.NimManager import nimmanager
8 from Components.config import getConfigListEntry, config, ConfigNothing, ConfigSelection, updateConfigElement
9 from Components.Sources.List import List
10 from Screens.MessageBox import MessageBox
11
12 from time import mktime, localtime
13 from datetime import datetime
14
15 class NimSetup(Screen, ConfigListScreen):
16         def createSimpleSetup(self, list, mode):
17                 if mode == "single":
18                         list.append(getConfigListEntry(_("Satellite"), self.nimConfig.diseqcA))
19                 else:
20                         list.append(getConfigListEntry(_("Port A"), self.nimConfig.diseqcA))
21
22                 if mode in ["toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]:
23                         list.append(getConfigListEntry(_("Port B"), self.nimConfig.diseqcB))
24                         if mode == "diseqc_a_b_c_d":
25                                 list.append(getConfigListEntry(_("Port C"), self.nimConfig.diseqcC))
26                                 list.append(getConfigListEntry(_("Port D"), self.nimConfig.diseqcD))
27
28         def createPositionerSetup(self, list):
29                 nim = self.nimConfig
30                 list.append(getConfigListEntry(_("Longitude"), nim.longitude))
31                 list.append(getConfigListEntry(" ", nim.longitudeOrientation))
32                 list.append(getConfigListEntry(_("Latitude"), nim.latitude))
33                 list.append(getConfigListEntry(" ", nim.latitudeOrientation))
34                 if SystemInfo["CanMeasureFrontendInputPower"]:
35                         self.advancedPowerMeasurement = getConfigListEntry(_("Use Power Measurement"), nim.powerMeasurement)
36                         list.append(self.advancedPowerMeasurement)
37                         if nim.powerMeasurement.value:
38                                 list.append(getConfigListEntry(_("Power threshold in mA"), nim.powerThreshold))
39                                 self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), nim.turningSpeed)
40                                 list.append(self.turningSpeed)
41                                 if nim.turningSpeed.value == "fast epoch":
42                                         self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), nim.fastTurningBegin)
43                                         self.turnFastEpochEnd = getConfigListEntry(_("End time"), nim.fastTurningEnd)
44                                         list.append(self.turnFastEpochBegin)
45                                         list.append(self.turnFastEpochEnd)
46                 else:
47                         if nim.powerMeasurement.value:
48                                 nim.powerMeasurement.value = False
49                                 nim.powerMeasurement.save()
50                 
51         def createConfigMode(self):
52                 if self.nim.isCompatible("DVB-S"):
53                         choices = { "nothing": _("nothing connected"),
54                                                 "simple": _("simple"),
55                                                 "advanced": _("advanced")}
56                         #if len(nimmanager.getNimListOfType(nimmanager.getNimType(self.slotid), exception = x)) > 0:
57                         #       choices["equal"] = _("equal to")
58                         #       choices["satposdepends"] = _("second cable of motorized LNB")
59                         if len(nimmanager.canEqualTo(self.slotid)) > 0:
60                                 choices["equal"] = _("equal to")
61                         if len(nimmanager.canDependOn(self.slotid)) > 0:
62                                 choices["satposdepends"] = _("second cable of motorized LNB")
63                         if len(nimmanager.canConnectTo(self.slotid)) > 0:
64                                 choices["loopthrough"] = _("loopthrough to")
65                         self.nimConfig.configMode.setChoices(choices)
66                                                         
67         def createSetup(self):
68                 print "Creating setup"
69                 self.list = [ ]
70
71                 self.configMode = None
72                 self.diseqcModeEntry = None
73                 self.advancedSatsEntry = None
74                 self.advancedLnbsEntry = None
75                 self.advancedDiseqcMode = None
76                 self.advancedUsalsEntry = None
77                 self.advancedLof = None
78                 self.advancedPowerMeasurement = None
79                 self.turningSpeed = None
80                 self.turnFastEpochBegin = None
81                 self.turnFastEpochEnd = None
82                 self.uncommittedDiseqcCommand = None
83                 self.cableScanType = None
84                 self.have_advanced = False
85
86                 if self.nim.isCompatible("DVB-S"):
87                         self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
88                         self.list.append(self.configMode)
89
90                         if self.nimConfig.configMode.value == "simple":                 #simple setup
91                                 self.diseqcModeEntry = getConfigListEntry(_("DiSEqC Mode"), self.nimConfig.diseqcMode)
92                                 self.list.append(self.diseqcModeEntry)
93                                 if self.nimConfig.diseqcMode.value in ["single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]:
94                                         self.createSimpleSetup(self.list, self.nimConfig.diseqcMode.value)
95                                 if self.nimConfig.diseqcMode.value == "positioner":
96                                         self.createPositionerSetup(self.list)
97                         elif self.nimConfig.configMode.value == "equal":
98                                 choices = []
99                                 nimlist = nimmanager.canEqualTo(self.nim.slot)
100                                 for id in nimlist:
101                                         #choices.append((str(id), str(chr(65 + id))))
102                                         choices.append((str(id), nimmanager.getNimDescription(id)))
103                                 self.nimConfig.connectedTo.setChoices(choices)
104                                 #self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
105                                 self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
106                         elif self.nimConfig.configMode.value == "satposdepends":
107                                 choices = []
108                                 nimlist = nimmanager.canDependOn(self.nim.slot)
109                                 for id in nimlist:
110                                         #choices.append((str(id), str(chr(65 + id))))
111                                         choices.append((str(id), nimmanager.getNimDescription(id)))
112                                 self.nimConfig.connectedTo.setChoices(choices)
113                                 #self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
114                                 self.list.append(getConfigListEntry(_("Tuner"), self.nimConfig.connectedTo))
115                         elif self.nimConfig.configMode.value == "loopthrough":
116                                 choices = []
117                                 print "connectable to:", nimmanager.canConnectTo(self.slotid)
118                                 connectable = nimmanager.canConnectTo(self.slotid)
119                                 for id in connectable:
120                                         choices.append((str(id), nimmanager.getNimDescription(id)))
121                                 self.nimConfig.connectedTo.setChoices(choices)
122                                 #self.nimConfig.connectedTo = updateConfigElement(self.nimConfig.connectedTo, ConfigSelection(choices = choices))
123                                 self.list.append(getConfigListEntry(_("Connected to"), self.nimConfig.connectedTo))
124                         elif self.nimConfig.configMode.value == "nothing":
125                                 pass
126                         elif self.nimConfig.configMode.value == "advanced": # advanced
127                                 # SATs
128                                 self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
129                                 self.list.append(self.advancedSatsEntry)
130                                 cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
131                                 satlist = self.nimConfig.advanced.sat.keys()
132                                 if cur_orb_pos is not None:
133                                         if cur_orb_pos not in satlist:
134                                                 cur_orb_pos = satlist[0]
135                                         currSat = self.nimConfig.advanced.sat[cur_orb_pos]
136                                         self.fillListWithAdvancedSatEntrys(currSat)
137                                 self.have_advanced = True
138                 elif self.nim.isCompatible("DVB-C"):
139                         self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
140                         self.list.append(self.configMode)
141                         if self.nimConfig.configMode.value == "enabled":
142                                 self.cableScanType=getConfigListEntry(_("Used service scan type"), self.nimConfig.cable.scan_type)
143                                 self.list.append(self.cableScanType)
144                                 if self.nimConfig.cable.scan_type.value == "provider":
145                                         self.list.append(getConfigListEntry(_("Provider to scan"), self.nimConfig.cable.scan_provider))
146                                 else:
147                                         if self.nimConfig.cable.scan_type.value == "bands":
148                                                 self.list.append(getConfigListEntry(_("Scan band EU VHF I"), self.nimConfig.cable.scan_band_EU_VHF_I))
149                                                 self.list.append(getConfigListEntry(_("Scan band EU MID"), self.nimConfig.cable.scan_band_EU_MID))
150                                                 self.list.append(getConfigListEntry(_("Scan band EU VHF III"), self.nimConfig.cable.scan_band_EU_VHF_III))
151                                                 self.list.append(getConfigListEntry(_("Scan band EU UHF IV"), self.nimConfig.cable.scan_band_EU_UHF_IV))
152                                                 self.list.append(getConfigListEntry(_("Scan band EU UHF V"), self.nimConfig.cable.scan_band_EU_UHF_V))
153                                                 self.list.append(getConfigListEntry(_("Scan band EU SUPER"), self.nimConfig.cable.scan_band_EU_SUPER))
154                                                 self.list.append(getConfigListEntry(_("Scan band EU HYPER"), self.nimConfig.cable.scan_band_EU_HYPER))
155                                                 self.list.append(getConfigListEntry(_("Scan band US LOW"), self.nimConfig.cable.scan_band_US_LOW))
156                                                 self.list.append(getConfigListEntry(_("Scan band US MID"), self.nimConfig.cable.scan_band_US_MID))
157                                                 self.list.append(getConfigListEntry(_("Scan band US HIGH"), self.nimConfig.cable.scan_band_US_HIGH))
158                                                 self.list.append(getConfigListEntry(_("Scan band US SUPER"), self.nimConfig.cable.scan_band_US_SUPER))
159                                                 self.list.append(getConfigListEntry(_("Scan band US HYPER"), self.nimConfig.cable.scan_band_US_HYPER))
160                                         elif self.nimConfig.cable.scan_type.value == "steps":
161                                                 self.list.append(getConfigListEntry(_("Frequency scan step size(khz)"), self.nimConfig.cable.scan_frequency_steps))
162                                         self.list.append(getConfigListEntry(_("Scan QAM16"), self.nimConfig.cable.scan_mod_qam16))
163                                         self.list.append(getConfigListEntry(_("Scan QAM32"), self.nimConfig.cable.scan_mod_qam32))
164                                         self.list.append(getConfigListEntry(_("Scan QAM64"), self.nimConfig.cable.scan_mod_qam64))
165                                         self.list.append(getConfigListEntry(_("Scan QAM128"), self.nimConfig.cable.scan_mod_qam128))
166                                         self.list.append(getConfigListEntry(_("Scan QAM256"), self.nimConfig.cable.scan_mod_qam256))
167                                         self.list.append(getConfigListEntry(_("Scan SR6900"), self.nimConfig.cable.scan_sr_6900))
168                                         self.list.append(getConfigListEntry(_("Scan SR6875"), self.nimConfig.cable.scan_sr_6875))
169                                         self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext1))
170                                         self.list.append(getConfigListEntry(_("Scan additional SR"), self.nimConfig.cable.scan_sr_ext2))
171                         self.have_advanced = False
172                 elif self.nim.isCompatible("DVB-T"):
173                         self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
174                         self.list.append(self.configMode)
175                         self.have_advanced = False
176                         if self.nimConfig.configMode.value == "enabled":
177                                 self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.terrestrial))
178                                 self.list.append(getConfigListEntry(_("Enable 5V for active antenna"), self.nimConfig.terrestrial_5V))
179                 else:
180                         self.have_advanced = False
181                 self["config"].list = self.list
182                 self["config"].l.setList(self.list)
183
184         def newConfig(self):
185                 checkList = (self.configMode, self.diseqcModeEntry, self.advancedSatsEntry, \
186                         self.advancedLnbsEntry, self.advancedDiseqcMode, self.advancedUsalsEntry, \
187                         self.advancedLof, self.advancedPowerMeasurement, self.turningSpeed, \
188                         self.uncommittedDiseqcCommand, self.cableScanType)
189                 for x in checkList:
190                         if self["config"].getCurrent() == x:
191                                 self.createSetup()
192
193         def run(self):
194                 if self.have_advanced and self.nim.config_mode == "advanced":
195                         self.fillAdvancedList()
196                 for x in self.list:
197                         if x in [self.turnFastEpochBegin, self.turnFastEpochEnd]:
198                                 # workaround for storing only hour*3600+min*60 value in configfile
199                                 # not really needed.. just for cosmetics..
200                                 tm = localtime(x[1].value)
201                                 dt = datetime(1970, 1, 1, tm.tm_hour, tm.tm_min)
202                                 x[1].value = int(mktime(dt.timetuple()))
203                         x[1].save()
204                 nimmanager.sec.update()
205                 self.saveAll()
206
207         def fillListWithAdvancedSatEntrys(self, Sat):
208                 currLnb = self.nimConfig.advanced.lnb[int(Sat.lnb.value)]
209                 
210                 if isinstance(currLnb, ConfigNothing):
211                         currLnb = None
212
213                 self.list.append(getConfigListEntry(_("Voltage mode"), Sat.voltage))
214                 self.list.append(getConfigListEntry(_("Tone mode"), Sat.tonemode))
215                 if currLnb and currLnb.diseqcMode.value == "1_2":
216                         self.advancedUsalsEntry = getConfigListEntry(_("Use usals for this sat"), Sat.usals)
217                         self.list.append(self.advancedUsalsEntry)
218                         if not Sat.usals.value:
219                                 self.list.append(getConfigListEntry(_("Stored position"), Sat.rotorposition))
220
221                 # LNBs
222                 self.advancedLnbsEntry = getConfigListEntry(_("LNB"), Sat.lnb)
223                 self.list.append(self.advancedLnbsEntry)
224                 if currLnb:
225                         self.advancedDiseqcMode = getConfigListEntry(_("DiSEqC mode"), currLnb.diseqcMode)
226                         self.list.append(self.advancedDiseqcMode)
227                         if currLnb.diseqcMode.value != "none":
228                                 self.list.append(getConfigListEntry(_("Toneburst"), currLnb.toneburst))
229                                 self.list.append(getConfigListEntry(_("Committed DiSEqC command"), currLnb.commitedDiseqcCommand))
230                                 self.list.append(getConfigListEntry(_("Fast DiSEqC"), currLnb.fastDiseqc))
231                                 self.list.append(getConfigListEntry(_("Sequence repeat"), currLnb.sequenceRepeat))
232                                 if currLnb.diseqcMode.value == "1_0":
233                                         self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder1_0))
234                                 else:
235                                         if currLnb.uncommittedDiseqcCommand.index:
236                                                 if currLnb.commandOrder.value == "ct":
237                                                         currLnb.commandOrder.value = "cut"
238                                                 elif currLnb.commandOrder.value == "tc":
239                                                         currLnb.commandOrder.value = "tcu"
240                                         else:
241                                                 if currLnb.commandOrder.index & 1:
242                                                         currLnb.commandOrder.value = "tc"
243                                                 else:
244                                                         currLnb.commandOrder.value = "ct"
245                                         self.list.append(getConfigListEntry(_("Command order"), currLnb.commandOrder))
246                                         self.uncommittedDiseqcCommand = getConfigListEntry(_("Uncommitted DiSEqC command"), currLnb.uncommittedDiseqcCommand)
247                                         self.list.append(self.uncommittedDiseqcCommand)
248                                         self.list.append(getConfigListEntry(_("DiSEqC repeats"), currLnb.diseqcRepeats))
249                                 if currLnb.diseqcMode.value == "1_2":
250                                         self.list.append(getConfigListEntry(_("Longitude"), currLnb.longitude))
251                                         self.list.append(getConfigListEntry(" ", currLnb.longitudeOrientation))
252                                         self.list.append(getConfigListEntry(_("Latitude"), currLnb.latitude))
253                                         self.list.append(getConfigListEntry(" ", currLnb.latitudeOrientation))
254                                         if SystemInfo["CanMeasureFrontendInputPower"]:
255                                                 self.advancedPowerMeasurement = getConfigListEntry(_("Use Power Measurement"), currLnb.powerMeasurement)
256                                                 self.list.append(self.advancedPowerMeasurement)
257                                                 if currLnb.powerMeasurement.value:
258                                                         self.list.append(getConfigListEntry(_("Power threshold in mA"), currLnb.powerThreshold))
259                                                         self.turningSpeed = getConfigListEntry(_("Rotor turning speed"), currLnb.turningSpeed)
260                                                         self.list.append(self.turningSpeed)
261                                                         if currLnb.turningSpeed.value == "fast epoch":
262                                                                 self.turnFastEpochBegin = getConfigListEntry(_("Begin time"), currLnb.fastTurningBegin)
263                                                                 self.turnFastEpochEnd = getConfigListEntry(_("End time"), currLnb.fastTurningEnd)
264                                                                 self.list.append(self.turnFastEpochBegin)
265                                                                 self.list.append(self.turnFastEpochEnd)
266                                         else:
267                                                 if currLnb.powerMeasurement.value:
268                                                         currLnb.powerMeasurement.value = False
269                                                         currLnb.powerMeasurement.save()
270                         self.advancedLof = getConfigListEntry(_("LOF"), currLnb.lof)
271                         self.list.append(self.advancedLof)
272                         if currLnb.lof.value == "user_defined":
273                                 self.list.append(getConfigListEntry(_("LOF/L"), currLnb.lofl))
274                                 self.list.append(getConfigListEntry(_("LOF/H"), currLnb.lofh))
275                                 self.list.append(getConfigListEntry(_("Threshold"), currLnb.threshold))
276 #                       self.list.append(getConfigListEntry(_("12V Output"), currLnb.output_12v))
277                         self.list.append(getConfigListEntry(_("Increased voltage"), currLnb.increased_voltage))
278
279         def fillAdvancedList(self):
280                 self.list = [ ]
281                 self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
282                 self.list.append(self.configMode)
283                 self.advancedSatsEntry = getConfigListEntry(_("Satellite"), self.nimConfig.advanced.sats)
284                 self.list.append(self.advancedSatsEntry)
285                 for x in nimmanager.satList:
286                         Sat = self.nimConfig.advanced.sat[x[0]]
287                         self.fillListWithAdvancedSatEntrys(Sat)
288                 self["config"].list = self.list
289
290         def keySave(self):
291                 old_configured_sats = nimmanager.getConfiguredSats()
292                 self.run()
293                 new_configured_sats = nimmanager.getConfiguredSats()
294                 self.unconfed_sats = old_configured_sats - new_configured_sats
295                 self.satpos_to_remove = None
296                 self.deleteConfirmed(False)
297
298         def deleteConfirmed(self, confirmed):
299                 if confirmed:
300                         eDVBDB.getInstance().removeServices(-1, -1, -1, self.satpos_to_remove)
301
302                 if self.satpos_to_remove is not None:
303                         self.unconfed_sats.remove(self.satpos_to_remove)
304
305                 self.satpos_to_remove = None
306                 for orbpos in self.unconfed_sats:
307                         self.satpos_to_remove = orbpos
308                         orbpos = self.satpos_to_remove
309                         try:
310                                 # why we need this cast?
311                                 sat_name = str(nimmanager.getSatDescription(orbpos))
312                         except:
313                                 if orbpos > 1800: # west
314                                         orbpos = 3600 - orbpos
315                                         h = _("W")
316                                 else:
317                                         h = _("E")
318                                 sat_name = ("%d.%d" + h) % (orbpos / 10, orbpos % 10)
319                         self.session.openWithCallback(self.deleteConfirmed, MessageBox, _("Delete no more configured satellite\n%s?") %(sat_name))
320                         break
321                 if not self.satpos_to_remove:
322                         self.close()
323
324         def __init__(self, session, slotid):
325                 Screen.__init__(self, session)
326                 self.list = [ ]
327
328                 ConfigListScreen.__init__(self, self.list)
329
330                 self["actions"] = ActionMap(["SetupActions"],
331                 {
332                         "ok": self.keySave,
333                         "cancel": self.keyCancel,
334                 }, -2)
335
336                 self.slotid = slotid
337                 self.nim = nimmanager.nim_slots[slotid]
338                 self.nimConfig = self.nim.config
339                 self.createConfigMode()
340                 self.createSetup()
341
342         def keyLeft(self):
343                 ConfigListScreen.keyLeft(self)
344                 self.newConfig()
345
346         def keyRight(self):
347                 ConfigListScreen.keyRight(self)
348                 self.newConfig()
349                 
350         def saveAll(self):
351                 if self.nim.isCompatible("DVB-S"):
352                         # reset connectedTo to all choices to properly store the default value
353                         choices = []
354                         nimlist = nimmanager.getNimListOfType("DVB-S", self.slotid)
355                         for id in nimlist:
356                                 choices.append((str(id), nimmanager.getNimDescription(id)))
357                         self.nimConfig.connectedTo.setChoices(choices)
358                 for x in self["config"].list:
359                         x[1].save()
360                         
361         def cancelConfirm(self, result):
362                 if not result:
363                         return
364
365                 for x in self["config"].list:
366                         x[1].cancel()
367                 # we need to call saveAll to reset the connectedTo choices
368                 self.saveAll()
369                 self.close()
370                         
371 class NimSelection(Screen):
372         def __init__(self, session):
373                 Screen.__init__(self, session)
374                 
375                 self.list = [None] * nimmanager.getSlotCount()
376                 self["nimlist"] = List(self.list)
377                 self.updateList()
378
379                 self["actions"] = ActionMap(["OkCancelActions"],
380                 {
381                         "ok": self.okbuttonClick ,
382                         "cancel": self.close
383                 }, -2)
384
385         def okbuttonClick(self):
386                 nim = self["nimlist"].getCurrent()
387                 nim = nim and nim[3]
388                 if nim is not None and not nim.empty:
389                         self.session.openWithCallback(self.updateList, NimSetup, nim.slot)
390
391         def updateList(self):
392                 self.list = [ ]
393                 for x in nimmanager.nim_slots:
394                         slotid = x.slot
395                         nimConfig = nimmanager.getNimConfig(x.slot)
396                         text = nimConfig.configMode.value
397                         if x.isCompatible("DVB-S"):
398                                 if nimConfig.configMode.value in ["loopthrough", "equal", "satposdepends"]:
399                                         text = { "loopthrough": _("loopthrough to"),
400                                                          "equal": _("equal to"),
401                                                          "satposdepends": _("second cable of motorized LNB") } [nimConfig.configMode.value]
402                                         text += + " " + _("Tuner") + " " + ["A", "B", "C", "D"][int(nimConfig.connectedTo.value)]
403                                 elif nimConfig.configMode.value == "nothing":
404                                         text = _("nothing connected")
405                                 elif nimConfig.configMode.value == "simple":
406                                         if nimConfig.diseqcMode.value in ["single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]:
407                                                 text = _("Sats") + ": " + nimmanager.getSatName(int(nimConfig.diseqcA.value))
408                                                 if nimConfig.diseqcMode.value in ["toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]:
409                                                         text += "," + nimmanager.getSatName(int(nimConfig.diseqcB.value))
410                                                 if nimConfig.diseqcMode.value == "diseqc_a_b_c_d":
411                                                         text += "," + nimmanager.getSatName(int(nimConfig.diseqcC.value))
412                                                         text += "," + nimmanager.getSatName(int(nimConfig.diseqcD.value))
413                                         elif nimConfig.diseqcMode.value == "positioner":
414                                                 text = _("Positioner") + ":"
415                                                 if nimConfig.positionerMode.value == "usals":
416                                                         text += _("USALS")
417                                                 elif nimConfig.positionerMode.value == "manual":
418                                                         text += _("manual")
419                                         else:   
420                                                 text = _("simple")
421                                 elif nimConfig.configMode.value == "advanced":
422                                         text = _("advanced")
423                         elif x.isCompatible("DVB-T") or x.isCompatible("DVB-C"):
424                                 if nimConfig.configMode.value == "nothing":
425                                         text = _("nothing connected")
426                                 elif nimConfig.configMode.value == "enabled":
427                                         text = _("enabled")
428                                 
429                         self.list.append((slotid, x.friendly_full_description, text, x))
430                 self["nimlist"].updateList(self.list)