From: ghost Date: Fri, 13 Feb 2009 12:03:59 +0000 (+0100) Subject: add possibility to override tuner type in ConvertToHumanReadable X-Git-Tag: 2.6.0~434^2^2 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/64b5a4111134ff98a5cb22e481508a2045ec9cd3 add possibility to override tuner type in ConvertToHumanReadable --- diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py index 6d2ddce3..fa533c0b 100644 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py @@ -355,7 +355,7 @@ class PositionerSetup(Screen): self["snr_bar"].update() self["ber_bar"].update() self["lock_state"].update() - transponderdata = ConvertToHumanReadable(self.tuner.getTransponderData()) + transponderdata = ConvertToHumanReadable(self.tuner.getTransponderData(), "DVB-S") self["frequency_value"].setText(str(transponderdata.get("frequency"))) self["symbolrate_value"].setText(str(transponderdata.get("symbol_rate"))) self["fec_value"].setText(str(transponderdata.get("fec_inner"))) diff --git a/lib/python/Tools/Transponder.py b/lib/python/Tools/Transponder.py index f37603c5..6868929c 100644 --- a/lib/python/Tools/Transponder.py +++ b/lib/python/Tools/Transponder.py @@ -1,8 +1,9 @@ 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"] = { @@ -111,6 +112,8 @@ def ConvertToHumanReadable(tp): 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]