Merge branch 'bug_258_sorting_of_configsatlist' into experimental
authorghost <andreas.monzner@multimedia-labs.de>
Sun, 8 Nov 2009 09:55:52 +0000 (10:55 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Sun, 8 Nov 2009 09:55:52 +0000 (10:55 +0100)
1  2 
lib/python/Components/NimManager.py

index 5ca80ce7aa2372fb5879266b32fabb4a0c28e0d2,05204a74c3b51795db5e125cba992375e891c126..78e17bb7233505e5e5c77f1674cdbbe56b25ae05
@@@ -554,6 -554,13 +554,13 @@@ class NimManager
        def getSatDescription(self, pos):
                return self.satellites[pos]
  
+       def sortFunc(self, x):
+               orbpos = x[0]
+               if orbpos > 1800:
+                       return orbpos - 3600
+               else:
+                       return orbpos + 1800
        def readTransponders(self):
                # read initial networks from file. we only read files which we are interested in,
                # which means only these where a compatible tuner exists.
                if self.hasNimType("DVB-S"):
                        print "Reading satellites.xml"
                        db.readSatellites(self.satList, self.satellites, self.transponders)
-                       self.satList.sort(key = lambda x: x[0]) # sort by orbpos
+                       self.satList.sort(key = self.sortFunc) # sort by orbpos
                        #print "SATLIST", self.satList
                        #print "SATS", self.satellites
                        #print "TRANSPONDERS", self.transponders
@@@ -940,7 -947,7 +947,7 @@@ def InitNimManager(nimmgr)
  
        lnb_choices = {
                "universal_lnb": _("Universal LNB"),
 -#             "unicable": _("Unicable"),
 +              "unicable": _("Unicable"),
                "c_band": _("C-Band"),
                "user_defined": _("User defined")}