From 16de1556df6506d51de05f4950176c0f5166dd0c Mon Sep 17 00:00:00 2001 From: Littlesat Date: Fri, 2 Aug 2024 16:06:07 +0200 Subject: [PATCH] Add function getTunableReferences to nimmanager In preperation for new functionality in future that can delete services from lamedb and userbouquwts that cannot be tuned --- lib/python/Components/NimManager.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 3ff394804f4..79e76655530 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -1189,6 +1189,21 @@ def getSatListForNim(self, slotid): def getNimListForSat(self, orb_pos): return [nim.slot for nim in self.nim_slots if nim.isCompatible("DVB-S") and not nim.isFBCLink() and orb_pos in [sat[0] for sat in self.getSatListForNim(nim.slot)]] + def getTunableReferences(self): + referenceList = [] + for nim in self.nim_slots: + if nim.isCompatible("DVB-S") and not nim.isFBCLink(): + for reference in [hex(satellite[0])[2:].zfill(4) for satellite in self.getSatListForNim(nim.slot)]: + if reference not in referenceList: + referenceList.append(reference) + elif nim.isCompatible("DVB-C") and not nim.isFBCLink() and 'ffff' not in reflist: + referenceList.append('ffff') + elif nim.isCompatible("DVB-T") and not nim.isFBCLink() and 'eeee' not in reflist: + referenceList.append('eeee') + elif nim.isCompatible("ATSC") and not nim.isFBCLink() and 'dddd' not in reflist: + referenceList.append('dddd') + return referenceList + def rotorLastPositionForNim(self, slotid, number=True): available_slot = False for slot in self.nim_slots: