Softwaremanager: * properly count processed packages.
[enigma2.git] / lib / python / Screens / ScanSetup.py
index aed9026844c87acbbdc53eac35f4294c5d697086..1dbc150591a627edc8b97fd79af5affc2f077132 100644 (file)
@@ -138,7 +138,8 @@ class CableTransponderSearchSupport:
                                        "QAM128" : parm.Modulation_QAM128,
                                        "QAM256" : parm.Modulation_QAM256 }
                                inv = { "INVERSION_OFF" : parm.Inversion_Off,
-                                       "INVERSION_ON" : parm.Inversion_On }
+                                       "INVERSION_ON" : parm.Inversion_On,
+                                       "INVERSION_AUTO" : parm.Inversion_Unknown }
                                fec = { "FEC_AUTO" : parm.FEC_Auto,
                                        "FEC_1_2" : parm.FEC_1_2,
                                        "FEC_2_3" : parm.FEC_2_3,
@@ -295,9 +296,11 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
 
                self.list = []
                ConfigListScreen.__init__(self, self.list)
-               self.createSetup()
-
-               self["introduction"] = Label(_("Press OK to start the scan"))
+               if not self.scan_nims.value == "":
+                       self.createSetup()
+                       self["introduction"] = Label(_("Press OK to start the scan"))
+               else:
+                       self["introduction"] = Label(_("Nothing to scan!\nPlease setup your tuner settings before you start a service scan."))
 
        def runAsync(self, finished_cb):
                self.finished_cb = finished_cb
@@ -522,6 +525,8 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
                        for n in nimmanager.nim_slots:
                                if n.config_mode == "nothing":
                                        continue
+                               if n.config_mode == "advanced" and len(nimmanager.getSatListForNim(n.slot)) < 1:
+                                       continue
                                if n.config_mode in ("loopthrough", "satposdepends"):
                                        root_id = nimmanager.sec.getRoot(n.slot_id, int(n.config.connectedTo.value))
                                        if n.type == nimmanager.nim_slots[root_id].type: # check if connected from a DVB-S to DVB-S2 Nim or vice versa
@@ -709,6 +714,8 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
                tlist.append(buildTerTransponder(*args, **kwargs))
 
        def keyGo(self):
+               if self.scan_nims.value == "":
+                       return
                tlist = []
                flags = None
                startScan = True
@@ -729,10 +736,11 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
                                assert len(self.scan_satselection) > index_to_scan
                                
                                nimsats = self.satList[index_to_scan]
-                               orbpos = self.scan_satselection[index_to_scan].getOrbitalPosition()
+                               selsatidx = self.scan_satselection[index_to_scan].index
 
                                # however, the satList itself could be empty. in that case, "index" is 0 (for "None").
                                if len(nimsats):
+                                       orbpos = nimsats[selsatidx][0]
                                        if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S:
                                                fec = self.scan_sat.fec.value
                                        else:
@@ -750,7 +758,7 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
                                                                self.scan_sat.pilot.value)
                                removeAll = False
                        elif self.scan_type.value == "single_satellite":
-                               sat = self.scan_satselection[index_to_scan].getSat()
+                               sat = self.satList[index_to_scan][self.scan_satselection[index_to_scan].index]
                                getInitialTransponderList(tlist, sat[0])
                        elif self.scan_type.value.find("multisat") != -1:
                                SatList = nimmanager.getSatListForNim(index_to_scan)