ScanSetup: Return the TerrestrialDescription in list and only when something is conne...
authorAthanasios Oikonomou <athoik@gmail.com>
Sun, 10 Jan 2016 18:20:48 +0000 (20:20 +0200)
committerMike Looijmans <milo@openpli.org>
Sun, 10 Jan 2016 18:43:46 +0000 (19:43 +0100)
The getNetworksForNim returns list of Networks for the specified NIM, but for DVB-T
the description was returned as string causing the DVB-T network to append on know_networks
letter by letter on initialization of ScanSimple class.

Also for DVB-T we didn't check if something was connected on NIM, so know_networks
were filled with DVB-T network but NIM was excluded from scanning as we don't scan
nims if nothing is connected. Now we return DVB-T network only is something is connected.

Signed-off-by: Mike Looijmans <milo@openpli.org>

lib/python/Screens/ScanSetup.py

index b210a2a..1a5d5ec 100644 (file)
@@ -1453,7 +1453,9 @@ class ScanSimple(ConfigListScreen, Screen, CableTransponderSearchSupport, Terres
                        if not networks and config.Nims[nim.slot].configMode.value == "enabled":
                                networks = [ nim.type ]
                elif nim.isCompatible("DVB-T"):
-                       networks = nimmanager.getTerrestrialDescription(nim.slot)
+                       networks = [nimmanager.getTerrestrialDescription(nim.slot)]
+                       if not nimmanager.somethingConnected(nim.slot):
+                               networks = []
                elif not nim.empty:
                        networks = [ nim.type ] # "DVB-C" or "DVB-T". TODO: seperate networks for different C/T tuners, if we want to support that.
                else: