add possibility to override tuner type in ConvertToHumanReadable
authorghost <andreas.monzner@multimedia-labs.de>
Fri, 13 Feb 2009 12:03:59 +0000 (13:03 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Fri, 13 Feb 2009 12:03:59 +0000 (13:03 +0100)
lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py
lib/python/Tools/Transponder.py

index 6d2ddce36069ea787113582fe08f4e0fd7b32b9e..fa533c0b4d478aa08a4be245b7f1cf9336e2200d 100644 (file)
@@ -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")))
index f37603c5cf1122796a11f8e3427b28aedf6a78a4..6868929c022d661b44881672fbf2cd5061722000 100644 (file)
@@ -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]