rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
elif service.getPath().find("flags ==") != -1:
elif service.getPath().find("flags == %d" %(FLAG_SERVICE_NEW_FOUND)) != -1:
def showSatellites(self): if not self.pathChangedDisabled: refstr = '%s FROM SATELLITES ORDER BY satellitePosition'%(self.service_types) if not self.preEnterPath(refstr): ref = eServiceReference(refstr) justSet=False prev = None
self.val = parent.value self.vals = parent.vals
def checkValues(self): if self.parent.value < 0: self.parent.value = 0 if(self.parent.value >= (len(self.parent.vals) - 1)): self.parent.value = len(self.parent.vals) - 1 def cancel(self): print "cancel" def save(self): print "save"
def __init__(self, parent): self.parent = parent self.val = parent.value self.vals = parent.vals
self.val = self.val - 1
self.parent.value = self.parent.value - 1
def handleKey(self, key): if key == 1: self.val = self.val - 1 if key == 2: self.val = self.val + 1 if self.val < 0: self.val = 0
self.val = self.val + 1 if self.val < 0: self.val = 0
self.parent.value = self.parent.value + 1 self.checkValues()
def handleKey(self, key): if key == 1: self.val = self.val - 1 if key == 2: self.val = self.val + 1 if self.val < 0: self.val = 0
self.parent.change() def __call__(self): self.checkValues()
def handleKey(self, key): if key == 1: self.val = self.val - 1 if key == 2: self.val = self.val + 1 if self.val < 0: self.val = 0
def __call__(self): print len(self.vals) print self.val if(self.val > (len(self.vals) - 1)): self.val = len(self.vals) - 1 return ("text",self.vals[self.val])
return ("text", self.parent.vals[self.parent.value])
def __call__(self): #needed by configlist print len(self.vals) print self.val if(self.val > (len(self.vals) - 1)): self.val = len(self.vals) - 1 return ("text",self.vals[self.val])
self.val = parent.value
def cancel(self): print "slider - cancel" def save(self): print "slider - save" def checkValues(self): if self.parent.value < 0: self.parent.value = 0 if self.parent.value > 10: self.parent.value = 10
def __init__(self, parent): self.parent = parent self.val = parent.value
self.val = self.val + 1 if self.val < 0: self.val = 0
self.parent.value = self.parent.value + 1 self.checkValues() self.parent.change()
def handleKey(self, key): if key == 1: self.val = self.val - 1 if key == 2: self.val = self.val + 1 if self.val < 0: self.val = 0
if self.val > 10: self.val = 10
def handleKey(self, key): if key == 1: self.val = self.val - 1 if key == 2: self.val = self.val + 1 if self.val < 0: self.val = 0
return ("slider", self.val * 10)
self.checkValues() return ("slider", self.parent.value * 10)
def __call__(self): #needed by configlist return ("slider", self.val * 10)
config.scan.sat.symbolrate = configElement_nonSave("config.scan.sat.symbolrate", configSequence, [27500], configsequencearg.get("INTEGER", (1, 9999)))
config.scan.sat.symbolrate = configElement_nonSave("config.scan.sat.symbolrate", configSequence, [27500], configsequencearg.get("INTEGER", (1, 99999)))
def createConfig(self): config.scan = ConfigSubsection() config.scan.sat = ConfigSubsection() config.scan.cab = ConfigSubsection() config.scan.ter = ConfigSubsection()
config.scan.cab.symbolrate = configElement_nonSave("config.scan.cab.symbolrate", configSequence, [6900], configsequencearg.get("INTEGER", (1, 30000)))
config.scan.cab.symbolrate = configElement_nonSave("config.scan.cab.symbolrate", configSequence, [6900], configsequencearg.get("INTEGER", (1, 9999)))
def createConfig(self): config.scan = ConfigSubsection() config.scan.sat = ConfigSubsection() config.scan.cab = ConfigSubsection() config.scan.ter = ConfigSubsection()
assert self.type in [self.LOCK, selef.BER], "the boolean output of FrontendInfo can only be used for lock or BER info"
assert self.type in [self.LOCK, self.BER], "the boolean output of FrontendInfo can only be used for lock or BER info"
def getBool(self): assert self.type in [self.LOCK, selef.BER], "the boolean output of FrontendInfo can only be used for lock or BER info" if self.type == self.LOCK: return self.source.lock else: return self.source.ber > 0
if ref.valid() and ref.getPath() == "":
if ref != None and ref.valid() and ref.getPath() == "":
def onShow(self): ref = self.session.nav.getCurrentlyPlayingServiceReference() if ref.valid() and ref.getPath() == "": self.servicelist.setPlayableIgnoreService(ref) else: self.servicelist.setPlayableIgnoreService(eServiceReference())
self.session.currentDialog.instance.setTitle(_("Downloadale new plugins"))
self.session.currentDialog.instance.setTitle(_("Downloadable new plugins"))
def setTitle(self): if self.type == self.DOWNLOAD: self.session.currentDialog.instance.setTitle(_("Downloadale new plugins")) elif self.type == self.REMOVE: self.session.currentDialog.instance.setTitle(_("Remove plugins"))
if (config.Nims[slotid].diseqcMode.value <= 3): list.append(self.satList[config.Nims[slotid].diseqcA.value]) if (0 < config.Nims[slotid].diseqcMode.value <= 3): list.append(self.satList[config.Nims[slotid].diseqcB.value]) if (config.Nims[slotid].diseqcMode.value == 3): list.append(self.satList[config.Nims[slotid].diseq...
if (self.getNimType(slotid) != self.nimType["empty/unknown"]): if (config.Nims[slotid].diseqcMode.value <= 3): list.append(self.satList[config.Nims[slotid].diseqcA.value]) if (0 < config.Nims[slotid].diseqcMode.value <= 3): list.append(self.satList[config.Nims[slotid].diseqcB.value]) if (config.Nims[slotid].diseqcM...
def getSatListForNim(self, slotid): #print "slotid:", slotid list = [] #print "self.satellites:", self.satList[config.Nims[slotid].diseqcA.value] #print "diseqcA:", config.Nims[slotid].diseqcA.value if (config.Nims[slotid].diseqcMode.value <= 3): list.append(self.satList[config.Nims[slotid].diseqcA.value]) if (0 < conf...
loadAlternatives()
try: loadAlternatives() except: pass
def autostart(reason): if reason == 0: loadAlternatives() NavigationInstance.instance.playService = type(NavigationInstance.instance.playService)(playService, NavigationInstance, Navigation)
def addLNBSimple(self, slotid, diseqcmode, toneburstmode = 0, diseqcpos = 0, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0):
def addLNBSimple(self, sec, slotid, diseqcmode, toneburstmode = 0, diseqcpos = 0, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0):
def addLNBSimple(self, slotid, diseqcmode, toneburstmode = 0, diseqcpos = 0, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0): #simple defaults sec = eDVBSatelliteEquipmentControl.getInstance() sec.addLNB() sec.setLNBTunerMask(1 << slotid) sec.setLNBLOFL(9750000) sec.setLNBLOFH(10600000) sec.s...
sec = eDVBSatelliteEquipmentControl.getInstance()
def addLNBSimple(self, slotid, diseqcmode, toneburstmode = 0, diseqcpos = 0, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0): #simple defaults sec = eDVBSatelliteEquipmentControl.getInstance() sec.addLNB() sec.setLNBTunerMask(1 << slotid) sec.setLNBLOFL(9750000) sec.setLNBLOFH(10600000) sec.s...
sec.setLNBTunerMask(1 << slotid)
tunermask = 1 << slotid if self.linked.has_key(slotid): tunermask |= (1 << self.linked[slotid]) sec.setLNBTunerMask(tunermask)
def addLNBSimple(self, slotid, diseqcmode, toneburstmode = 0, diseqcpos = 0, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0): #simple defaults sec = eDVBSatelliteEquipmentControl.getInstance() sec.addLNB() sec.setLNBTunerMask(1 << slotid) sec.setLNBLOFL(9750000) sec.setLNBLOFH(10600000) sec.s...
sec.setVoltageMode(0) sec.setToneMode(0)
sec.setVoltageMode(switchParam.HV) sec.setToneMode(switchParam.HILO)
def addLNBSimple(self, slotid, diseqcmode, toneburstmode = 0, diseqcpos = 0, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0): #simple defaults sec = eDVBSatelliteEquipmentControl.getInstance() sec.addLNB() sec.setLNBTunerMask(1 << slotid) sec.setLNBLOFL(9750000) sec.setLNBLOFH(10600000) sec.s...
def linkNIMs(self, nim1, nim2): eDVBSatelliteEquipmentControl.getInstance().setTunerLinked(nim1, nim2)
def linkNIMs(self, sec, nim1, nim2): print "link", nim1, "to", nim2 sec.setTunerLinked(nim1, nim2)
def addLNBSimple(self, slotid, diseqcmode, toneburstmode = 0, diseqcpos = 0, orbpos = 0, longitude = 0, latitude = 0, loDirection = 0, laDirection = 0): #simple defaults sec = eDVBSatelliteEquipmentControl.getInstance() sec.addLNB() sec.setLNBTunerMask(1 << slotid) sec.setLNBLOFL(9750000) sec.setLNBLOFH(10600000) sec.s...
eDVBSatelliteEquipmentControl.getInstance().clear()
sec = eDVBSatelliteEquipmentControl.getInstance() sec.clear()
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
self.linkNIMs(x, nim.linkedTo.value) nim = config.Nims[nim.linkedTo.value]
pass
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = 0, diseqcmode = 0, diseqcpos = 4)
self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.NONE, diseqcpos = diseqcParam.SENDNO)
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = 1, diseqcmode = 0, diseqcpos = 4) self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcB.vals[nim.diseqcB.value][1]), toneburstmode = 1, diseqcmode = 0, diseqcpos = 4)
self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = diseqcParam.A, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.SENDNO) self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcB.vals[nim.diseqcB.value][1]), toneburstmode = diseqcParam.B, diseqcmode = dise...
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 0) self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcB.vals[nim.diseqcB.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 1)
self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA) self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcB.vals[nim.diseqcB.value][1]), toneburstmode = diseqcParam.NO, diseqcmode = diseqc...
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 0) self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcB.vals[nim.diseqcB.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 1) self.addLNBSimple(slotid = x, orbpos = int(nim.diseq...
self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA) self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcB.vals[nim.diseqcB.value][1]), toneburstmode = diseqcParam.NO, diseqcmode = diseqc...
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
self.addLNBSimple(slotid = x, diseqcmode = 3, longitude = float(str(nim.longitude.value[0]) + "." + str(nim.longitude.value[1])), loDirection = nim.longitudeOrientation.value - 2, latitude = float(str(nim.latitude.value[0]) + "." + str(nim.latitude.value[1])), laDirection = nim.latitudeOrientation.value) pass
if currentConfigSelectionElement(nim.latitudeOrientation) == "north": laValue = rotorParam.NORTH else: laValue = rotorParam.SOUTH if currentConfigSelectionElement(nim.longitudeOrientation) == "east": loValue = rotorParam.EAST else: loValue = rotorParam.WEST self.addLNBSimple(sec, slotid = x, diseqcmode = 3, longitude =...
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
else: self.updateAdvanced(x) def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance()
else: self.updateAdvanced(sec, x) def updateAdvanced(self, sec, slotid):
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
sec.setLNBTunerMask(1 << slotid)
tunermask = 1 << slotid if self.linked.has_key(slotid): tunermask |= (1 << self.linked[slotid]) sec.setLNBTunerMask(tunermask)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
sec.setLNBLOFL(currLnb.lofl.value * 1000) sec.setLNBLOFH(currLnb.lofh.value * 1000) sec.setLNBThreshold(currLnb.threshold.value * 1000)
sec.setLNBLOFL(currLnb.lofl.value[0] * 1000) sec.setLNBLOFH(currLnb.lofh.value[0] * 1000) sec.setLNBThreshold(currLnb.threshold.value[0] * 1000)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setLNBIncreasedVoltage(lnbParam.ON)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setLNBIncreasedVoltage(lnbParam.OFF)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setDiSEqCMode(diseqcParam.NONE)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setDiSEqCMode(diseqcParam.V1_0)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setDiSEqCMode(diseqcParam.V1_1)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setDiSEqCMode(diseqcParam.V1_2)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setToneburst(diseqcParam.NO)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setToneburst(diseqcParam.A)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setToneburst(diseqcParam.B)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setCommittedCommand(diseqcParam.SENDNO)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setCommittedCommand(diseqcParam.AA)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setCommittedCommand(diseqcParam.AB)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setCommittedCommand(diseqcParam.BA)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setCommittedCommand(diseqcParam.BB)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setFastDiSEqC(True)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setFastDiSEqC(False)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setSeqRepeat(True)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setSeqRepeat(False)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
if currLnb.uncommittedDiseqcCommand.value > 0: sec.setUncommittedCommand(0xF0|(currLnb.uncommittedDiseqcCommand.value-1)) else: sec.setUncommittedCommand(0)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setRepeats(0)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setRepeats(1)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setRepeats(2)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setRepeats(3) setCommandOrder=False
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
setCommandOrder=True
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
setCommandOrder=True if setCommandOrder: sec.setCommandOrder(currCO)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
sec.setLaDirection(nim.latitudeOrientation.value)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
sec.setLoDirection(nim.longitudeOrientation.value - 2)
if currentConfigSelectionElement(currLnb.latitudeOrientation) == "north": sec.setLaDirection(rotorParam.NORTH) else: sec.setLaDirection(rotorParam.SOUTH) if currentConfigSelectionElement(currLnb.longitudeOrientation) == "east": sec.setLoDirection(rotorParam.EAST) else: sec.setLoDirection(rotorParam.WEST)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setUseInputpower(True) sec.setInputpowerDelta(currLnb.powerThreshold.value[0]) else: sec.setUseInputpower(False)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setVoltageMode(switchParam.HV)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setVoltageMode(switchParam._14V)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setVoltageMode(switchParam._18V)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setToneMode(switchParam.HILO)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setToneMode(switchParam.ON)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setToneMode(switchParam.OFF)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setRotorPosNum(currSat.rotorposition.value)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
pass
sec.setRotorPosNum(0)
def updateAdvanced(self, slotid): sec = eDVBSatelliteEquipmentControl.getInstance() lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = confi...
nim.longitudeOrientation = configElement(cname + "longitudeOrientation", configSelection, 0, (_("East"), _("West")))
nim.longitudeOrientation = configElement(cname + "longitudeOrientation", configSelection, 0, (("east",_("East")), ("west", _("West"))))
def nimPortDChanged(slotid, configElement): nimmgr.nimPortDChanged(slotid, configElement.vals[configElement.value][1])
fp = file('/etc/network/interfaces', 'r')
fp = file('/etc/resolv.conf', 'r')
def loadNetworkConfig(self): try: # parse the interfaces-file fp = file('/etc/network/interfaces', 'r') interfaces = fp.readlines() fp.close() ifaces = {} currif = "" for i in interfaces: split = i.strip().split(' ') if (split[0] == "iface"): currif = split[1] ifaces[currif] = {} if (len(split) == 4 and split[3] == "d...
class ChoiceList(HTMLComponent, GUIComponent, MenuList):
class ChoiceList(MenuList, HTMLComponent, GUIComponent):
def ChoiceEntryComponent(key, text): res = [ text ] res.append((eListboxPythonMultiContent.TYPE_TEXT, 32, 00, 800,25, 0, RT_HALIGN_LEFT, text[0])) png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "key_" + key + "-fs8.png")) if png is not None: res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 0, 30, 20, ...
def GUIcreate(self, parent): self.instance = eListbox(parent) self.instance.setContent(self.l) self.instance.setItemHeight(25)
GUI_WIDGET = eListbox def postWidgetCreate(self, instance): instance = eListbox(parent) instance.setContent(self.l) instance.setItemHeight(25)
def __init__(self, list): GUIComponent.__init__(self) self.l = eListboxPythonMultiContent() self.list = list self.l.setList(list) self.l.setFont(0, gFont("Regular", 20))
print "close old help window!"
def selectionChanged(self): n = self.getCurrent() if self.help_window: print "close old help window!" self.session.deleteDialog(self.help_window) nh = n and n[1].helpWindow() print "n, nh:", n, nh if nh is not None and self.session is not None: print "show new help window" self.help_window = self.session.instantiateD...
print "n, nh:", n, nh
def selectionChanged(self): n = self.getCurrent() if self.help_window: print "close old help window!" self.session.deleteDialog(self.help_window) nh = n and n[1].helpWindow() print "n, nh:", n, nh if nh is not None and self.session is not None: print "show new help window" self.help_window = self.session.instantiateD...
print "show new help window"
def selectionChanged(self): n = self.getCurrent() if self.help_window: print "close old help window!" self.session.deleteDialog(self.help_window) nh = n and n[1].helpWindow() print "n, nh:", n, nh if nh is not None and self.session is not None: print "show new help window" self.help_window = self.session.instantiateD...
print "config selection changed, from ", self.current, " to ", n
def selectionChanged(self): n = self.getCurrent() if self.help_window: print "close old help window!" self.session.deleteDialog(self.help_window) nh = n and n[1].helpWindow() print "n, nh:", n, nh if nh is not None and self.session is not None: print "show new help window" self.help_window = self.session.instantiateD...
}, -1)
}, -5)
def __init__(self, list, session = None): self["config_actions"] = NumberActionMap(["SetupActions", "TextInputActions"], { "ok": self.keyOK, "left": self.keyLeft, "right": self.keyRight, "delete": self.keyDelete, "1": self.keyNumberGlobal, "2": self.keyNumberGlobal, "3": self.keyNumberGlobal, "4": self.keyNumberGlobal,...
"ok": self.openEdit,
def __init__(self, session): Screen.__init__(self, session) list = [ ] for timer in session.nav.RecordTimer.timer_list: list.append(TimerEntry(timer, 0)) for timer in session.nav.RecordTimer.processed_timers: list.append(TimerEntry(timer, 1)) self["timerlist"] = TimerList(list)
<widget name="okbutton" position="10,190" size="280,50" />
<widget name="okbutton" position="10,190" size="280,50" font="Arial:20" valign="center" halign="center" />
def dump(x, i=0): print " " * i + str(x) try: for n in x.childNodes: dump(n, i + 1) except: None
if attrib == 'position': guiObject.move(parsePosition(value)) elif attrib == 'size': guiObject.resize(parseSize(value)) elif attrib == 'title': guiObject.setTitle(value) elif attrib != 'name': print "unsupported attribute " + attrib + "=" + value
try: if attrib == 'position': guiObject.move(parsePosition(value)) elif attrib == 'size': guiObject.resize(parseSize(value)) elif attrib == 'title': guiObject.setTitle(value) elif attrib == 'font': guiObject.setFont(parseFont(value)) elif attrib == "valign": try: guiObject.setVAlign( { "top": guiObject.alignTop, "cente...
def applyAttributes(guiObject, node): # walk all attributes for p in range(node.attributes.length): a = node.attributes.item(p) # convert to string (was: unicode) attrib = str(a.name) # TODO: proper UTF8 translation?! (for value) # TODO: localization? as in e1? value = str(a.value) # and set attributes if attrib == '...
for timer in session.nav.RecordTimer.timer_list: list.append(TimerEntryComponent(timer, 0)) for timer in session.nav.RecordTimer.processed_timers: list.append(TimerEntryComponent(timer, 1))
self.list = list self.fillTimerList()
def __init__(self, session): Screen.__init__(self, session) list = [ ] for timer in session.nav.RecordTimer.timer_list: list.append(TimerEntryComponent(timer, 0)) for timer in session.nav.RecordTimer.processed_timers: list.append(TimerEntryComponent(timer, 1)) self["timerlist"] = TimerList(list) self["key_red"] = B...
print ServiceReference(x).frontendStatusInfo().getFrontendData(True)
def updateAlternatives(self): self.alternativeslist = [] if len(self.serviceslist) > 0: alternativelist = self.alternatives[self["serviceslist"].getCurrent()[1]]
self.playEntry()
self.changeEntry(0)
def copyFile(self): self.playlist.addFile(self.filelist.getServiceRef()) self.playlist.updateList() if len(self.playlist) == 1: self.playEntry()
t = time() esize = self.l.getItemSize() self.l.setFont(0, gFont("Regular", 22)) self.l.setFont(1, gFont("Regular", 16)) width = esize.width() height = esize.height() if self.type == EPG_TYPE_SINGLE: w = width/20*5 self.datetime_rect = Rect(0,0, w, height) self.descr_rect = Rect(w, 0, width/20*15, height) else: xpos = 0...
if SINGLE_CPP == 0: esize = self.l.getItemSize() self.l.setFont(0, gFont("Regular", 22)) self.l.setFont(1, gFont("Regular", 16)) width = esize.width() height = esize.height() if self.type == EPG_TYPE_SINGLE: w = width/20*5 self.datetime_rect = Rect(0,0, w, height) self.descr_rect = Rect(w, 0, width/20*15, height) else:...
def recalcEntrySize(self): t = time() esize = self.l.getItemSize() self.l.setFont(0, gFont("Regular", 22)) self.l.setFont(1, gFont("Regular", 16)) width = esize.width() height = esize.height() if self.type == EPG_TYPE_SINGLE: w = width/20*5 self.datetime_rect = Rect(0,0, w, height) self.descr_rect = Rect(w, 0, width/20...
return service.timeshift()
return service and service.timeshift()
def getTimeshift(self): service = self.session.nav.getCurrentService() return service.timeshift()
self.event = event
def setEvent(self, event): if event is None: return self.event = event text = event.getEventName() short = event.getShortDescription() ext = event.getExtendedDescription() if len(short) > 0 and short != text: text = text + '\n\n' + short if len(ext) > 0: if len(text) > 0: text = text + '\n\n' text = text + ext
self.timerentry_justplay = ConfigSelection(choices = [("zap", _("zap")), ("record", _("record"))], default = {0: "record", 1: "record"}[justplay])
self.timerentry_justplay = ConfigSelection(choices = [("zap", _("zap")), ("record", _("record"))], default = {0: "record", 1: "zap"}[justplay])
def createConfig(self): justplay = self.timer.justplay afterevent = { AFTEREVENT.NONE: "nothing", AFTEREVENT.DEEPSTANDBY: "deepstandby", AFTEREVENT.STANDBY: "standby"}[self.timer.afterEvent] weekday_table = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]
self.session.openWithCallback(self.onDateTimeInputClosed, TimeDateInput)
if self.type == EPG_TYPE_MULTI: self.session.openWithCallback(self.onDateTimeInputClosed, TimeDateInput)
def enterDateTime(self): self.session.openWithCallback(self.onDateTimeInputClosed, TimeDateInput)
for sat in nimmanager.satList: self.list.append(getConfigListEntry(sat[0], config.scan.scansat[sat[1]]))
tlist = [] SatList = nimmanager.getSatListForNim(config.scan.nims.value) for x in SatList: if self.Satexists(tlist, x[1]) == 0: tlist.append(x[1]) sat = configElement_nonSave(x[1], configSelection, 0, ("Enable", "Disable")) self.list.append(getConfigListEntry(nimmanager.getSatDescription(x[1]), sat))
def createSetup(self): self.list = [] self.list.append(getConfigListEntry("Type of scan", config.scan.type)) self.list.append(getConfigListEntry("Tuner", config.scan.nims)) # single transponder scan if (config.scan.type.value == 0): if (nimmanager.getNimType(config.scan.nims.value) == nimmanager.nimType["DVB-S"]): se...
config.av.pip = ConfigPosition(default=[-1, -1, -1, -1], limits = (719, 567, 720, 568))
config.av.pip = ConfigPosition(default=[-1, -1, -1, -1], args = (719, 567, 720, 568))
def __init__(self, session): Screen.__init__(self, session) self["video"] = VideoWindow() self.currentService = None config.av.pip = ConfigPosition(default=[-1, -1, -1, -1], limits = (719, 567, 720, 568)) self.onLayoutFinish.append(self.LayoutFinished)
self.bouquet_root = eServiceReference('%s FROM BOUQUET "userbouquet.favourites.tv" ORDER BY bouquet'%(self.service_types))
self.bouquet_root = eServiceReference('1:7:1:0:0:0:0:0:0:0:(type == 1) FROM BOUQUET "bouquets.tv" ORDER BY bouquet')
def __init__(self, session): Screen.__init__(self, session)
if ref.valid() and ref.getPath() == "":
if ref is not None and ref.valid() and ref.getPath() == "":
def onShow(self): ref = self.session.nav.getCurrentlyPlayingServiceReference() if ref.valid() and ref.getPath() == "": self.servicelist.setPlayableIgnoreService(ref) else: self.servicelist.setPlayableIgnoreService(eServiceReference())
from twisted.web2 import server, http, static, resource, stream
from twisted.web2 import server, http, static, resource, stream, http_headers, responsecode
def startWebserver(): from twisted.internet import reactor from twisted.web2 import server, http, static, resource, stream import webif class ScreenPage(resource.Resource): def render(self, req): global sessions if sessions == [ ]: return http.Response("please wait until enigma has booted") s = stream.ProducerStream(...
return http.Response("please wait until enigma has booted")
return http.Response(200, stream="please wait until enigma has booted")
def render(self, req): global sessions if sessions == [ ]: return http.Response("please wait until enigma has booted") s = stream.ProducerStream() webif.renderPage(s, req, sessions[0]) # login? return http.Response(stream=s)
return 'Hello! you want probably go to <a href="/test">the test</a> instead.'
return http.Response(responsecode.OK, {'Content-type': http_headers.MimeType('text', 'html')}, stream='Hello! you want probably go to <a href="/test">the test</a> instead.')
def render(self, req): return 'Hello! you want probably go to <a href="/test">the test</a> instead.'
self.diseqccommand("moveTo", int(self.positioner_storage.value)
self.diseqccommand("moveTo", int(self.positioner_storage.value))
def yellowKey(self): entry = self.getCurrentConfigPath() if entry == "move": if self.isMoving: self.diseqccommand("stop") self.isMoving = False self.stopOnLock = False else: self.isMoving = True self.stopOnLock = True self.diseqccommand("moveEast", 0) self.updateColors("move") elif entry == "finemove": print "stepping ...
def __init__(self, session, transponders):
def __init__(self, session, transponders, flags):
def __init__(self, session, transponders): Screen.__init__(self, session) self.session.nav.stopService() self["scan_progress"] = ProgressBar() self["scan_state"] = Label("scan state") self["scan"] = CScan(self["scan_progress"], self["scan_state"], transponders)
self["scan"] = CScan(self["scan_progress"], self["scan_state"], transponders)
self["scan"] = CScan(self["scan_progress"], self["scan_state"], transponders, flags)
def __init__(self, session, transponders): Screen.__init__(self, session) self.session.nav.stopService() self["scan_progress"] = ProgressBar() self["scan_state"] = Label("scan state") self["scan"] = CScan(self["scan_progress"], self["scan_state"], transponders)
sec.setLatitude(float(str(currLnb.latitude.value[0]) + "." + str(currLnb.latitude.value[1]))) sec.setLongitude(float(str(currLnb.longitude.value[0]) + "." + str(currLnb.longitude.value[1])))
latitude = float(str(currLnb.latitude.value[0]) + "." + str(currLnb.latitude.value[1])) sec.setLatitude(latitude) longitude = float(str(currLnb.longitude.value[0]) + "." + str(currLnb.longitude.value[1])) sec.setLongitude(longitude)
def updateAdvanced(self, sec, slotid): lnbSat = {} for x in range(1,33): lnbSat[x] = [] for x in self.NimManager.satList: lnb = config.Nims[slotid].advanced.sat[x[1]].lnb.value if lnb != 0: print "add", x[1], "to", lnb lnbSat[lnb].append(x[1]) for x in range(1,33): if len(lnbSat[x]) > 0: currLnb = config.Nims[slotid].a...
nim.advanced.lnb[x].longitude = configElement(cname + "advanced.lnb" + str(x) + ".longitude", configSequence, [5,100], configsequencearg.get("FLOAT", [(0,90),(0,999)])); nim.advanced.lnb[x].longitudeOrientation = configElement(cname + "advanced.lnb" + str(x) + ".longitudeOrientation", configSelection, 0, (_("East"), _(...
nim.advanced.lnb[x].longitude = configElement(cname + "advanced.lnb" + str(x) + ".longitude", configSequence, [5,100], configsequencearg.get("FLOAT", [(0,90),(0,999)])) nim.advanced.lnb[x].longitudeOrientation = configElement(cname + "advanced.lnb" + str(x) + ".longitudeOrientation", configSelection, 0, (("east", _("Ea...
def nimPortDChanged(slotid, configElement): nimmgr.nimPortDChanged(slotid, configElement.vals[configElement.value][1])