Skip to content

Commit

Permalink
Add function getTunableReferences to nimmanager
Browse files Browse the repository at this point in the history
In preperation for new functionality in future that can delete services from
lamedb and userbouquwts that cannot be tuned
  • Loading branch information
Littlesat committed Aug 2, 2024
1 parent f0d3f6d commit 16de155
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/python/Components/NimManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 16de155

Please sign in to comment.