def __init__(self, session, lastConfiguration): print("[FastScan] start %s" % lastConfiguration[1]) Screen.__init__(self, session) self.skinName = "Standby" self["actions"] = ActionMap(["StandbyActions"], { "power": self.Power, "discrete_on": self.Power }, -1) self.onClose.append(self.__onClose) parameters = tuple(x[1] for x in providers if x[0] == lastConfiguration[1]) if parameters: parameters = parameters[0] pid = parameters[1] if lastConfiguration[2] and parameters[2]: pid += 1 self.scan = eFastScan(pid, lastConfiguration[1], self.getTransponderParameters(parameters[0]), lastConfiguration[3], lastConfiguration[4], len(lastConfiguration) > 5 and lastConfiguration[5]) self.scan.scanCompleted.get().append(self.scanCompleted) self.scan.start(int(lastConfiguration[0])) else: self.scan = None self.close(True)
def __init__(self, session, lastConfiguration): print "[AutoFastScan] start %s" % lastConfiguration[1] Screen.__init__(self, session) self.skinName="Standby" self["actions"] = ActionMap( [ "StandbyActions" ], { "power": self.Power, "discrete_on": self.Power }, -1) self.onClose.append(self.__onClose) parameters = tuple(x[1] for x in self.providers if x[0] == lastConfiguration[1]) if parameters: parameters = parameters[0] pid = parameters[1] if lastConfiguration[2] and parameters[2]: pid += 1 self.scan = eFastScan(pid, lastConfiguration[1], self.getTransponderParameters(parameters[0]), lastConfiguration[3], lastConfiguration[4], len(lastConfiguration) > 5 and lastConfiguration[5]) self.scan.scanCompleted.get().append(self.scanCompleted) self.scan.start(int(lastConfiguration[0])) else: self.scan = None self.close(True)
def doServiceScan(self): self["scan_state"].setText(_('Scanning %s...') % (self.providerName)) self["scan_progress"].setValue(0) self.scan = eFastScan(self.scanPid, self.providerName, self.transponderParameters, self.keepNumbers, self.keepSettings, self.createRadioBouquet) self.scan.scanCompleted.get().append(self.scanCompleted) self.scan.scanProgress.get().append(self.scanProgress) fstfile = None fntfile = None for root, dirs, files in os.walk('/tmp/'): for f in files: if f.endswith('.bin'): if '_FST' in f: fstfile = os.path.join(root, f) elif '_FNT' in f: fntfile = os.path.join(root, f) if fstfile and fntfile: self.scan.startFile(fntfile, fstfile) os.unlink(fstfile) os.unlink(fntfile) else: self.scan.start(self.scanTuner)
def execBegin(self): self.text.setText(_('Scanning %s...') % (self.providerName)) self.progressbar.setValue(0) self.scan = eFastScan(self.scanPid, self.providerName, self.transponderParameters, self.keepNumbers, self.keepSettings) self.scan.scanCompleted.get().append(self.scanCompleted) self.scan.scanProgress.get().append(self.scanProgress) fstfile = None fntfile = None for root, dirs, files in os_walk('/tmp/'): for f in files: if f.endswith('.bin'): if '_FST' in f: fstfile = os_path.join(root, f) elif '_FNT' in f: fntfile = os_path.join(root, f) if fstfile and fntfile: self.scan.startFile(fntfile, fstfile) os_unlink(fstfile) os_unlink(fntfile) else: self.scan.start(self.scanTuner)