- if frontendData is None:
- return []
- if frontendData["tuner_type"] == "DVB-S":
- return ( ("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
- ("Type", frontendData["tuner_type"], TYPE_TEXT),
- ("Orbital position", frontendData["orbital_position"], TYPE_VALUE_DEC),
- ("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
- ("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
- ("Polarization", frontendData["polarization"], TYPE_TEXT),
- ("Inversion", frontendData["inversion"], TYPE_TEXT),
- ("FEC inner", frontendData["fec_inner"], TYPE_TEXT),
- )
- elif frontendData["tuner_type"] == "DVB-C":
- return ( ("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
- ("Type", frontendData["tuner_type"], TYPE_TEXT),
- ("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
- ("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
- ("Modulation", frontendData["modulation"], TYPE_TEXT),
- ("Inversion", frontendData["inversion"], TYPE_TEXT),
- ("FEC inner", frontendData["fec_inner"], TYPE_TEXT),
- )
- elif frontendData["tuner_type"] == "DVB-T":
- return ( ("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
- ("Type", frontendData["tuner_type"], TYPE_TEXT),
- ("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
- ("Inversion", frontendData["inversion"], TYPE_TEXT),
- ("Bandwidth", frontendData["bandwidth"], TYPE_VALUE_DEC),
- ("CodeRateLP", frontendData["code_rate_lp"], TYPE_TEXT),
- ("CodeRateHP", frontendData["code_rate_hp"], TYPE_TEXT),
- ("Constellation", frontendData["constellation"], TYPE_TEXT),
- ("Transmission Mode", frontendData["transmission_mode"], TYPE_TEXT),
- ("Guard Interval", frontendData["guard_interval"], TYPE_TEXT),
- ("Hierarchy Inform.", frontendData["hierarchy_information"], TYPE_TEXT),
- )
-
+ if frontendData and len(frontendData):
+ if frontendData["tuner_type"] == "DVB-S":
+ return (("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
+ ("Type", frontendData["system"], TYPE_TEXT),
+ ("Modulation", frontendData["modulation"], TYPE_TEXT),
+ ("Orbital position", frontendData["orbital_position"], TYPE_VALUE_DEC),
+ ("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
+ ("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
+ ("Polarization", frontendData["polarization"], TYPE_TEXT),
+ ("Inversion", frontendData["inversion"], TYPE_TEXT),
+ ("FEC inner", frontendData["fec_inner"], TYPE_TEXT),
+ ("Pilot", frontendData.get("pilot", None), TYPE_TEXT),
+ ("Rolloff", frontendData.get("rolloff", None), TYPE_TEXT))
+ elif frontendData["tuner_type"] == "DVB-C":
+ return (("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
+ ("Type", frontendData["tuner_type"], TYPE_TEXT),
+ ("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
+ ("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
+ ("Modulation", frontendData["modulation"], TYPE_TEXT),
+ ("Inversion", frontendData["inversion"], TYPE_TEXT),
+ ("FEC inner", frontendData["fec_inner"], TYPE_TEXT))
+ elif frontendData["tuner_type"] == "DVB-T":
+ return (("NIM", ['A', 'B', 'C', 'D'][frontendData["tuner_number"]], TYPE_TEXT),
+ ("Type", frontendData["tuner_type"], TYPE_TEXT),
+ ("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
+ ("Inversion", frontendData["inversion"], TYPE_TEXT),
+ ("Bandwidth", frontendData["bandwidth"], TYPE_VALUE_DEC),
+ ("CodeRateLP", frontendData["code_rate_lp"], TYPE_TEXT),
+ ("CodeRateHP", frontendData["code_rate_hp"], TYPE_TEXT),
+ ("Constellation", frontendData["constellation"], TYPE_TEXT),
+ ("Transmission Mode", frontendData["transmission_mode"], TYPE_TEXT),
+ ("Guard Interval", frontendData["guard_interval"], TYPE_TEXT),
+ ("Hierarchy Inform.", frontendData["hierarchy_information"], TYPE_TEXT))
+ return [ ]
+