TransponderInfo - fix for terrestrial scaning when system info is None
authorims <ims21@users.sourceforge.net>
Mon, 20 Apr 2015 20:32:54 +0000 (22:32 +0200)
committerlittlesat <littlesat99@yahoo.com>
Tue, 21 Apr 2015 08:31:41 +0000 (10:31 +0200)
Signed-off-by: littlesat <littlesat99@yahoo.com>

lib/python/Components/Converter/TransponderInfo.py

index bc66352..0824deb 100644 (file)
@@ -37,12 +37,14 @@ class TransponderInfo(Converter, object):
                        return ""
                if transponderraw:
                        transponderdata = ConvertToHumanReadable(transponderraw)
-                       if not transponderdata:
+                       if not transponderdata["system"]:
+                               transponderdata["system"] = transponderraw.get("tuner_type", "None")
+                       if not transponderdata["system"]:
                                return ""
                        if "DVB-T" in transponderdata["system"]:
-                               return "%s %s %d MHz %s" % ("DVB-T", transponderdata["channel"], transponderdata["frequency"]/1000000 + 0.5 , transponderdata["bandwidth"])
+                               return "%s %s %d MHz %s" % (transponderdata["system"], transponderdata["channel"], transponderdata["frequency"]/1000000 + 0.5 , transponderdata["bandwidth"])
                        elif "DVB-C" in transponderdata["system"]:
-                               return "%s %d MHz %d %s %s" % ("DVB-C", transponderdata["frequency"]/1000 + 0.5, transponderdata["symbol_rate"]/1000 + 0.5, transponderdata["fec_inner"], \
+                               return "%s %d MHz %d %s %s" % (transponderdata["system"], transponderdata["frequency"]/1000 + 0.5, transponderdata["symbol_rate"]/1000 + 0.5, transponderdata["fec_inner"], \
                                        transponderdata["modulation"])
                        return "%s %d %s %d %s %s %s" % (transponderdata["system"], transponderdata["frequency"]/1000 + 0.5, transponderdata["polarization_abbreviation"], transponderdata["symbol_rate"]/1000 + 0.5, \
                                transponderdata["fec_inner"], transponderdata["modulation"], transponderdata["detailed_satpos" in self.type and "orbital_position" or "orb_pos"])