from enigma import eDVBFrontendParametersSatellite, eDVBFrontendParametersCable, eDVBFrontendParametersTerrestrial
-def ConvertToHumanReadable(tp):
+def ConvertToHumanReadable(tp, type = None):
ret = { }
- type = tp.get("tuner_type", "None")
+ if type is None:
+ type = tp.get("tuner_type", "None")
if type == "DVB-S":
ret["tuner_type"] = _("Satellite")
ret["inversion"] = {
eDVBFrontendParametersTerrestrial.FEC_2_3 : "2/3",
eDVBFrontendParametersTerrestrial.FEC_3_4 : "3/4",
eDVBFrontendParametersTerrestrial.FEC_5_6 : "5/6",
- eDVBFrontendParametersTerrestrial.FEC_7_8 : "7/8"}[tp["code_rate_lp"]]
+ eDVBFrontendParametersTerrestrial.FEC_7_8 : "7/8"}[tp["code_rate_hp"]]
ret["constellation"] = {
eDVBFrontendParametersTerrestrial.Modulation_Auto : _("Auto"),
eDVBFrontendParametersTerrestrial.Modulation_QPSK : "QPSK",
eDVBFrontendParametersTerrestrial.Inversion_Unknown : _("Auto"),
eDVBFrontendParametersTerrestrial.Inversion_On : _("On"),
eDVBFrontendParametersTerrestrial.Inversion_Off : _("Off")}[tp["inversion"]]
+ else:
+ print "ConvertToHumanReadable: no or unknown type in tpdata dict!"
for x in tp.keys():
if not ret.has_key(x):
ret[x] = tp[x]