def __init__(self, id, label, infotext=None): services = [Option(s.modulation, s.name) for s in Modes.getAvailableServices()] super().__init__(id, label, services, infotext)
def isSupported(self, mode): configured = Config.get()["services_decoders"] available = [m.modulation for m in Modes.getAvailableServices()] return mode in configured and mode in available