def InitAVSwitch():
config.av = ConfigSubsection();
- config.av.colorformat = configElement("config.av.colorformat", configSelection, 1, ("CVBS", "RGB", "S-Video") );
- config.av.aspectratio = configElement("config.av.aspectratio", configSelection, 0, ("4:3 Letterbox", "4:3 PanScan", "16:9", "16:9 always") );
+ config.av.colorformat = configElement("config.av.colorformat", configSelection, 1, (("cvbs", _("CVBS")), ("rgb", _("RGB")), ("svideo", _("S-Video")) ));
+ config.av.aspectratio = configElement("config.av.aspectratio", configSelection, 0, (("4_3_letterbox", _("4:3 Letterbox")), ("4_3_panscan", _("4:3 PanScan")), ("16_9", _("16:9")), ("16_9_always", _("16:9 always"))) );
#config.av.tvsystem = configElement("config.av.tvsystem", configSelection, 0, ("PAL", "PAL + PAL60", "Multi", "NTSC") );
- config.av.tvsystem = configElement("config.av.tvsystem", configSelection, 0, ("PAL", "NTSC") );
- config.av.wss = configElement("config.av.wss", configSelection, 0, ("Enable", "Disable") );
- config.av.defaultac3 = configElement("config.av.defaultac3", configSelection, 1, ("Enable", "Disable") );
- config.av.vcrswitch = configElement("config.av.vcrswitch", configSelection, 1, ("Enable", "Disable") );
+ config.av.tvsystem = configElement("config.av.tvsystem", configSelection, 0, (("pal", _("PAL")), ("ntsc", _("NTSC"))) );
+ config.av.wss = configElement("config.av.wss", configSelection, 0, (("enable", _("Enable")), ("disable", _("Disable"))) );
+ config.av.defaultac3 = configElement("config.av.defaultac3", configSelection, 1, (("enable", _("Enable")), ("disable", _("Disable"))));
+ config.av.vcrswitch = configElement("config.av.vcrswitch", configSelection, 1, (("enable", _("Enable")), ("disable", _("Disable"))));
iAVSwitch = AVSwitch()
def setInverted(self, value):
if value:
value = 255
- eDBoxLCD.getInstance().setInverted(value)
+ eDBoxLCD.getInstance().setInverted(1 - value)
pass
def InitLcd():
config.lcd = ConfigSubsection();
- config.lcd.bright = configElement("config.lcd.bright", ConfigSlider, 10, "");
- config.lcd.contrast = configElement("config.lcd.contrast", ConfigSlider, 10, "");
- config.lcd.standby = configElement("config.lcd.standby", ConfigSlider, 0, "");
- config.lcd.invert = configElement("config.lcd.invert", configSelection, 0, (_("Disable"), _("Enable")) );
+ config.lcd.bright = configElement("config.lcd.bright", ConfigSlider, 10, "")
+ config.lcd.contrast = configElement("config.lcd.contrast", ConfigSlider, 10, "")
+ config.lcd.standby = configElement("config.lcd.standby", ConfigSlider, 0, "")
+ config.lcd.invert = configElement("config.lcd.invert", configSelection, 0, (("enable", _("Enable")), ("disable", _("Disable"))))
ilcd = LCD()
config.network = ConfigSubsection()
- config.network.dhcp = configElement_nonSave("config.network.dhcp", configSelection, 1, (_("no"), _("yes")))
+ config.network.dhcp = configElement_nonSave("config.network.dhcp", configSelection, 1, (("no", _("no")), ("yes", _("yes"))))
config.network.ip = configElement_nonSave("config.network.ip", configSequence, ip, configsequencearg.get("IP"))
config.network.netmask = configElement_nonSave("config.network.netmask", configSequence, [255,255,255,0], configsequencearg.get("IP"))
config.network.gateway = configElement_nonSave("config.network.gateway", configSequence, [192,168,1,3], configsequencearg.get("IP"))
nim = config.Nims[x]
if slot.nimType == nimmgr.nimType["DVB-S"]:
- nim.configMode = configElement(cname + "configMode", configSelection, 0, (_("Simple"), _("Nothing connected"), _("Loopthrough to Socket A"))) # "Advanced"));
+ nim.configMode = configElement(cname + "configMode", configSelection, 0, (("simple", _("Simple")), ("nothing", _("Nothing connected")), ("loopthrough", _("Loopthrough to Socket A")))) # "Advanced"));
#important - check if just the 2nd one is LT only and the first one is DVB-S
if nim.configMode.value == 2: #linked
nim.configMode.value = 0 #reset to simple
nim.configMode.save()
- nim.diseqcMode = configElement(cname + "diseqcMode", configSelection, 2, (_("Single"), _("Toneburst A/B"), _("DiSEqC A/B"), _("DiSEqC A/B/C/D"), _("Positioner")));
+ nim.diseqcMode = configElement(cname + "diseqcMode", configSelection, 2, (("single", _("Single")), ("toneburst_a_b", _("Toneburst A/B")), ("diseqc_a_b", _("DiSEqC A/B")), ("diseqc_a_b_c_d", _("DiSEqC A/B/C/D")), ("positioner", _("Positioner"))));
nim.diseqcA = configElement(cname + "diseqcA", configSatlist, 192, nimmgr.satList);
nim.diseqcB = configElement(cname + "diseqcB", configSatlist, 130, nimmgr.satList);
nim.diseqcC = configElement(cname + "diseqcC", configSatlist, 0, nimmgr.satList);
nim.diseqcD = configElement(cname + "diseqcD", configSatlist, 0, nimmgr.satList);
- nim.positionerMode = configElement(cname + "positionerMode", configSelection, 0, (_("USALS"), _("manual")));
+ nim.positionerMode = configElement(cname + "positionerMode", configSelection, 0, (("usals", _("USALS")), ("manual", _("manual"))));
nim.longitude = configElement(cname + "longitude", configSequence, [5,100], configsequencearg.get("FLOAT", [(0,90),(0,999)]));
nim.longitudeOrientation = configElement(cname + "longitudeOrientation", configSelection, 0, (_("East"), _("West")))
nim.latitude = configElement(cname + "latitude", configSequence, [50,767], configsequencearg.get("FLOAT", [(0,90),(0,999)]));
- nim.latitudeOrientation = configElement(cname + "latitudeOrientation", configSelection, 0, (_("North"), _("South")))
+ nim.latitudeOrientation = configElement(cname + "latitudeOrientation", configSelection, 0, (("north", _("North")), ("south", _("South"))))
satNimList = nimmgr.getNimListOfType(nimmgr.nimType["DVB-S"], slot.slotid)
satNimListNames = []
for x in satNimList:
- satNimListNames.append(_("Slot ") + ("A", "B", "C", "D")[x] + ": " + nimmgr.getNimName(x))
+ satNimListNames.append((("Slot_" + ("A", "B", "C", "D")[x] + "_" + nimmgr.getNimName(x)), _("Slot ") + ("A", "B", "C", "D")[x] + ": " + nimmgr.getNimName(x)))
nim.linkedTo = configElement(cname + "linkedTo", configSelection, 0, satNimListNames);
#perhaps the instance of the slot is more useful?
def InitRFmod():
config.rfmod = ConfigSubsection();
- config.rfmod.enable = configElement("config.rfmod.enable", configSelection, 1, ("Enable", "Disable") );
- config.rfmod.test = configElement("config.rfmod.test", configSelection, 1, ("Enable", "Disable") );
- config.rfmod.sound = configElement("config.rfmod.sound", configSelection, 0, ("Enable", "Disable") );
+ config.rfmod.enable = configElement("config.rfmod.enable", configSelection, 1, (("enable", _("Enable")), ("disable", _("Disable"))) );
+ config.rfmod.test = configElement("config.rfmod.test", configSelection, 1, (("enable", _("Enable")), ("disable", _("Disable"))) );
+ config.rfmod.sound = configElement("config.rfmod.sound", configSelection, 0, (("enable", _("Enable")), ("disable", _("Disable"))) );
config.rfmod.soundcarrier = configElement("config.rfmod.soundcarrier", configSelection, 1, ("4.5 MHz", "5.5 MHz", "6.0 MHz", "6.5 MHz") );
config.rfmod.channel = configElement("config.rfmod.channel", configSelection, 6, ("30", "31", "32", "33", "34", "35", "36", "37", "38", "39") );
config.rfmod.finetune = configElement("config.rfmod.finetune", ConfigSlider, 5, "");
def InitRecordingConfig():
config.recording = ConfigSubsection();
- config.recording.asktozap = configElement("config.recording.asktozap", configSelection, 1, (_("yes"), _("no")) );
+ config.recording.asktozap = configElement("config.recording.asktozap", configSelection, 1, (("yes", _("yes")), ("no", _("no"))) );
def __call__(self, selected): #needed by configlist
self.checkValues()
- return ("text", _(self.parent.vals[self.parent.value]))
+ if isinstance(self.parent.vals[self.parent.value], str):
+ returnValue = _(self.parent.vals[self.parent.value])
+ else:
+ returnValue = _(self.parent.vals[self.parent.value][1])
+
+ print self.parent.vals[self.parent.value]
+
+ return ("text", returnValue)
+
class configDateTime:
def __init__(self, parent):
self.parent = parent
if control == ConfigSlider:
return int(data)
elif control == configSelection:
- return int(data)
+ try:
+ return int(data)
+ except:
+ for x in data.split(":"):
+ if x[0] == "*":
+ count = 0
+ for y in self.vals:
+ if y[0] == x[1:-1]:
+ return count
+ count += 1
+ return self.defaultValue
elif control == configDateTime:
return int(data)
elif control == configText:
if control == ConfigSlider:
return str(data)
elif control == configSelection:
+ if isinstance(self.vals[data], str):
+ return str(data)
+ else:
+ confList = []
+ count = 0
+ for x in self.vals:
+ if count == data:
+ confList.append("*" + str(x[0] + "*"))
+ else:
+ confList.append(x[0])
+ count += 1
+ return ":".join(confList)
return str(data)
elif control == configDateTime:
return str(data)