FrontendInfo: When we have more than x tuners indicate it condesed.
authorlittlesat <littlesat99@yahoo.com>
Thu, 7 Jan 2016 18:20:45 +0000 (19:20 +0100)
committerlittlesat <littlesat99@yahoo.com>
Thu, 7 Jan 2016 18:24:51 +0000 (19:24 +0100)
With option STRING in frontendInfo the frontend status is showed in a
string with color changes. Usually the unused tuners are displayed in
grey. But know when we have default more then 5 tuners the non used tuners
will not be tuned. You can change the default 5 by adding an integer as
option (e.g. STRING,10 shows max 10 tuner positions instead of 5)

This patch is more intended for the VU+Solo with FBC tuners capability.
note that previously we had with the default skin max 5 positions...

lib/python/Components/Converter/FrontendInfo.py

index 21644aa..86b3e32 100644 (file)
@@ -27,8 +27,10 @@ class FrontendInfo(Converter, object):
                        self.type = self.SLOT_NUMBER
                elif type == "TYPE":
                        self.type = self.TUNER_TYPE
-               elif type == "STRING":
+               elif type.startswith("STRING"):
                        self.type = self.STRING
+                       type = type.split(",")
+                       self.space_for_tuners = len(type) > 1 and int(type[1]) or 5
                else:
                        self.type = self.LOCK
 
@@ -64,8 +66,10 @@ class FrontendInfo(Converter, object):
                                                string += "\c0000??00"
                                        elif self.source.tuner_mask & 1 << n.slot:
                                                string += "\c00????00"
-                                       else:
+                                       elif len(nimmanager.nim_slots) <= self.space_for_tuners:
                                                string += "\c007?7?7?"
+                                       else:
+                                               continue
                                        string += chr(ord("A")+n.slot)
                        return string
                if percent is None: