From: ghost Date: Sun, 8 Nov 2009 09:55:25 +0000 (+0100) Subject: NimManager.py: another fix of satellite sort order .. now we sort from the westernmos... X-Git-Tag: 2.7.0~54^2 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/406b024501ad0bf0473d08b345de5e94c370804b?ds=sidebyside NimManager.py: another fix of satellite sort order .. now we sort from the westernmost to the easternmost satellite --- diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 8d6cff16..05204a74 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -554,6 +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. @@ -565,7 +572,7 @@ class NimManager: 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