Show which CAID, PROV, and ECM PID is being used.
I don't know if It could be done better, or easier, my limited python knownledge has done this:
Last function of ServiceInfo.py:
def ShowECMInformation(self): from Components.Converter.PliExtraInfo import caid_data from Tools.GetEcmInfo import GetEcmInfo self["Title"].text = _("Service info - ECM Info") tlist = [] self.ecmdata = GetEcmInfo() data = self.ecmdata.getEcmData() currentecmpid = data[3][2:] for caid in sorted(set(self.info.getInfoObject(iServiceInformation.sCAIDPIDs)), key=lambda x: (x[0], x[1])): CaIdDescription = _("Undefined") extra_info = "" for caid_entry in caid_data: if int(caid_entry[0], 16) <= caid[0] <= int(caid_entry[1], 16): CaIdDescription = caid_entry[2] break if caid[2]: provid = "" if CaIdDescription == "Seca": provid = caid[2][:4] if CaIdDescription == "Nagra": provid = caid[2][-4:] if CaIdDescription == "Via": provid = caid[2][-6:] if provid: extra_info = "provid=%s" % provid else: extra_info = "extra data=%s" % caid[2] ecmpid = "%04X" % caid[1] if ecmpid == currentecmpid: tlist.append(ServiceInfoListEntry("\c00??;?00*** ECMPid %04X (%d) %04X-%s %s ****" % (caid[1], caid[1], caid[0], CaIdDescription, extra_info))) else: tlist.append(ServiceInfoListEntry("ECMPid %04X (%d) %04X-%s %s" % (caid[1], caid[1], caid[0], CaIdDescription, extra_info))) if not tlist: tlist.append(ServiceInfoListEntry(_("No ECMPids available (FTA Service)"))) self["infolist"].l.setList(tlist)