X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/9b8c07c78ce40cbaed2f9cb7e35d23a2502d4638..f3d145e1d246e25b3fda5796216552ccbbdde1f0:/lib/python/Components/NimManager.py diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index c278213c..5ca80ce7 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -565,9 +565,10 @@ class NimManager: if self.hasNimType("DVB-S"): print "Reading satellites.xml" db.readSatellites(self.satList, self.satellites, self.transponders) -# print "SATLIST", self.satList -# print "SATS", self.satellites -# print "TRANSPONDERS", self.transponders + self.satList.sort(key = lambda x: x[0]) # sort by orbpos + #print "SATLIST", self.satList + #print "SATS", self.satellites + #print "TRANSPONDERS", self.transponders if self.hasNimType("DVB-C"): print "Reading cables.xml" @@ -759,6 +760,22 @@ class NimManager: def getSatList(self): return self.satList + + # returns True if something is configured to be connected to this nim + # if slotid == -1, returns if something is connected to ANY nim + def somethingConnected(self, slotid = -1): + if (slotid == -1): + connected = False + for id in range(self.getSlotCount()): + if self.somethingConnected(id): + connected = True + return connected + else: + nim = config.Nims[slotid] + configMode = nim.configMode.value + + if self.nim_slots[slotid].isCompatible("DVB-S") or self.nim_slots[slotid].isCompatible("DVB-T") or self.nim_slots[slotid].isCompatible("DVB-C"): + return not (configMode == "nothing") def getSatListForNim(self, slotid): list = []