Skip to content

Commit

Permalink
[PliExtraInfo] Add Tongfang
Browse files Browse the repository at this point in the history
Set Tongfang, Panaccess and DRE-Crypt to false to save space on infobar.
  • Loading branch information
Ev0-BH committed Nov 27, 2021
1 parent 7f17ec5 commit b51fd12
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions lib/python/Components/Converter/PliExtraInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
("0xb00", "0xbff", "Conax", "CO", True),
("0xd00", "0xdff", "CryptoWorks", "CW", True),
("0x2700", "0x2710", "DRE-Crypt3", "DC", False),
("0x4ae0", "0x4ae1", "DRE-Crypt", "DC", True),
("0x4ae0", "0x4ae1", "DRE-Crypt", "DC", False),
("0x900", "0x9ff", "NDS Videoguard", "ND", True),
("0x4afc", "0x4afc", "Panaccess", "PA", True),
("0x4afc", "0x4afc", "Panaccess", "PA", False),
("0xe00", "0xeff", "PowerVu", "PV", True),
("0x4a02", "0x4a02", "Tongfang", "TF", False),
("0x5601", "0x5604", "Verimatrix", "VM", True)
)

Expand Down Expand Up @@ -188,6 +189,7 @@ def __init__(self, type):
("CryptoCaidNDSAvailable", "ND", False),
("CryptoCaidPanaccessAvailable", "PA", False),
("CryptoCaidPowerVuAvailable", "PV", False),
("CryptoCaidTongfangAvailable", "TF", False),
("CryptoCaidVerimatrixAvailable", "VM", False),
("CryptoCaidBetaSelected", "B", True),
("CryptoCaidIrdetoSelected", "I", True),
Expand All @@ -205,6 +207,7 @@ def __init__(self, type):
("CryptoCaidNDSSelected", "ND", True),
("CryptoCaidPanaccessSelected", "PA", True),
("CryptoCaidPowerVuSelected", "PV", True),
("CryptoCaidTongfangSelected", "TF", True),
("CryptoCaidVerimatrixSelected", "VM", True),
)
self.type = self.type.split(',')
Expand Down Expand Up @@ -398,6 +401,22 @@ def createCryptoTandberg(self, info):
res += Hex2strColor(self.cryptocolors[3])
return res

def createCryptoTongfang(self, info):
available_caids = info.getInfoObject(iServiceInformation.sCAIDs)
if int('0x4a02', 16) <= int(self.current_caid, 16) <= int('0x4a02', 16):
color = Hex2strColor(self.cryptocolors[0])
else:
color = Hex2strColor(self.cryptocolors[1])
try:
for caid in available_caids:
if int('0x4a02', 16) <= caid <= int('0x4a02', 16):
color = Hex2strColor(self.cryptocolors[2])
except:
pass
res = color + 'TF'
res += Hex2strColor(self.cryptocolors[3])
return res

def createCryptoBeta(self, info):
available_caids = info.getInfoObject(iServiceInformation.sCAIDs)
if int('0x1700', 16) <= int(self.current_caid, 16) <= int('0x17ff', 16):
Expand Down

0 comments on commit b51fd12

Please sign in to comment.