X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ae96169ee008d8755894a25ed28fb4bc4f309593..059982cc102de394ac316abc3ee0806673d003d5:/lib/python/Screens/ScanSetup.py diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index 71096a52..6bad9a5c 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -86,12 +86,29 @@ class ScanSetup(Screen): # multi sat scan if (config.scan.type.value == 2): - for sat in nimmanager.satList: - self.list.append(getConfigListEntry(sat[0], config.scan.scansat[sat[1]])) + # if (norotor) + 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)) + + # if (rotor): + # for sat in nimmanager.satList: + # self.list.append(getConfigListEntry(sat[0], config.scan.scansat[sat[1]])) self["config"].list = self.list self["config"].l.setList(self.list) + def Satexists(self, tlist, pos): + for x in tlist: + if x == pos: + return 1 + return 0 + def newConfig(self): print self["config"].getCurrent() if self["config"].getCurrent()[0] == "Type of scan": @@ -170,4 +187,55 @@ class ScanSetup(Screen): def keyCancel(self): for x in self["config"].list: x[1].cancel() - self.close() \ No newline at end of file + self.close() + +class ScanSimple(Screen): + + def keyOK(self): + print "start scan for sats:" + for x in self.list: + if x[1].parent.value == 0: + print " " + str(x[1].parent.configPath) + + self.session.openWithCallback(self.keyCancel, ServiceScan) + + def keyCancel(self): + self.close() + + def keyLeft(self): + self["config"].handleKey(config.key["prevElement"]) + + def keyRight(self): + self["config"].handleKey(config.key["nextElement"]) + + def Satexists(self, tlist, pos): + for x in tlist: + if x == pos: + return 1 + return 0 + + def __init__(self, session): + Screen.__init__(self, session) + + self["actions"] = ActionMap(["SetupActions"], + { + "ok": self.keyOK, + "cancel": self.keyCancel, + "left": self.keyLeft, + "right": self.keyRight, + }, -1) + + self.list = [] + tlist = [] + + SatList = nimmanager.getConfiguredSats() + + for x in SatList: + if self.Satexists(tlist, x) == 0: + tlist.append(x) + sat = configElement_nonSave(x, configSelection, 0, ("Enable", "Disable")) + self.list.append(getConfigListEntry(nimmanager.getSatDescription(x), sat)) + + self["config"] = ConfigList(self.list) + self["header"] = Label("Automatic Scan") + self["footer"] = Label("Press OK to scan")