more codecleanup
[enigma2.git] / lib / python / Plugins / SystemPlugins / Satfinder / plugin.py
index 87dc81e4abad28f1f27cdb3a0e7ba368cf6ed126..048bad901b4f20941bb8aecffbee35025a692038 100644 (file)
@@ -14,7 +14,6 @@ from Components.MenuList import MenuList
 from Components.config import ConfigSelection, getConfigListEntry
 from Components.TuneTest import Tuner
 
-
 class Satfinder(ScanSetup):
        def openFrontend(self):
                res_mgr = eDVBResourceManager.getInstance()
@@ -77,14 +76,14 @@ class Satfinder(ScanSetup):
                                self.list.append(self.systemEntry)
                        else:
                                # downgrade to dvb-s, in case a -s2 config was active
-                               self.scan_sat.system.value = "dvb-s"
+                               self.scan_sat.system.value = eDVBFrontendParametersSatellite.System_DVB_S
                        self.list.append(getConfigListEntry(_('Frequency'), self.scan_sat.frequency))
                        self.list.append(getConfigListEntry(_('Inversion'), self.scan_sat.inversion))
                        self.list.append(getConfigListEntry(_('Symbol Rate'), self.scan_sat.symbolrate))
                        self.list.append(getConfigListEntry(_("Polarity"), self.scan_sat.polarization))
-                       if self.scan_sat.system.value == "dvb-s":
+                       if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S:
                                self.list.append(getConfigListEntry(_("FEC"), self.scan_sat.fec))
-                       elif self.scan_sat.system.value == "dvb-s2":
+                       elif self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S2:
                                self.list.append(getConfigListEntry(_("FEC"), self.scan_sat.fec_s2))
                                self.modulationEntry = getConfigListEntry(_('Modulation'), self.scan_sat.modulation)
                                self.list.append(self.modulationEntry)
@@ -111,31 +110,21 @@ class Satfinder(ScanSetup):
                returnvalue = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
                satpos = int(self.tuning_sat.value)
                if self.tuning_type.value == "manual_transponder":
-                       if self.scan_sat.system.value == "dvb-s2":
+                       if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S2:
                                fec = self.scan_sat.fec_s2.value
                        else:
                                fec = self.scan_sat.fec.value
                        returnvalue = (
                                self.scan_sat.frequency.value,
                                self.scan_sat.symbolrate.value,
-                               self.scan_sat.polarization.index,
-                               { "auto": 0,
-                                  "1_2": 1,
-                                  "2_3": 2,
-                                  "3_4": 3,
-                                  "5_6": 4,
-                                  "7_8": 5,
-                                  "8_9": 6,
-                                  "3_5": 7,
-                                  "4_5": 8,
-                                  "9_10": 9,
-                                  "none": 15 }[fec],
-                               self.scan_sat.inversion.index,
+                               self.scan_sat.polarization.value,
+                               fec,
+                               self.scan_sat.inversion.value,
                                satpos,
-                               self.scan_sat.system.index,
-                               self.scan_sat.modulation.index == 1 and 2 or 1,
-                               self.scan_sat.rolloff.index,
-                               self.scan_sat.pilot.index)
+                               self.scan_sat.system.value,
+                               self.scan_sat.modulation.value,
+                               self.scan_sat.rolloff.value,
+                               self.scan_sat.pilot.value)
                        self.tune(returnvalue)
                elif self.tuning_type.value == "predefined_transponder":
                        tps = nimmanager.getTransponders(satpos)