[ScanSetup] Add MTSIF Dual T2 Tuner automatic scan.
[vuplus_dvbapp] / lib / python / Screens / ScanSetup.py
index fa3126b..e5b5291 100644 (file)
@@ -114,9 +114,12 @@ terrestrial_autoscan_nimtype = {
 'SSH108' : 'ssh108_t2_scan',
 'TT3L10' : 'tt3l10_t2_scan',
 'TURBO' : 'vuplus_turbo_t',
-'TT2L08' : 'tt2l08_t2_scan'
+'TT2L08' : 'tt2l08_t2_scan',
+'BCM3466' : 'bcm3466'
 }
 
+dual_tuner_list = ('TT3L10', 'BCM3466')
+
 def GetDeviceId(filter, nim_idx):
        tuners={}
        device_id = 0
@@ -450,9 +453,9 @@ class TerrestrialTransponderSearchSupport:
                        if nim_name is not None and nim_name != "":
                                device_id = ""
                                nim_name = nim_name.strip(':VTUNER').split(' ')[-1][4:-1]
-                               if nim_name == 'TT3L10':
+                               if nim_name in dual_tuner_list:
                                        try:
-                                               device_id = GetDeviceId('TT3L10', nim_idx)
+                                               device_id = GetDeviceId(nim_name, nim_idx)
                                                device_id = "--device %s" % (device_id)
                                        except Exception, err:
                                                print "terrestrialTransponderGetCmd ->", err
@@ -1399,8 +1402,11 @@ class ScanSimple(ConfigListScreen, Screen, CableTransponderSearchSupport, Terres
                self.finished_cb = None
 
                for nim in nimmanager.nim_slots:
-                       # collect networks provided by this tuner
+                       # don't offer to scan nims if nothing is connected
+                       if not nimmanager.somethingConnected(nim.slot):
+                               continue
 
+                       # collect networks provided by this tuner
                        need_scan = False
                        networks = self.getNetworksForNim(nim)
                        
@@ -1414,10 +1420,6 @@ class ScanSimple(ConfigListScreen, Screen, CableTransponderSearchSupport, Terres
                                        need_scan = True
                                        print x, "not in ", known_networks
                                        known_networks.append(x)
-                                       
-                       # don't offer to scan nims if nothing is connected
-                       if not nimmanager.somethingConnected(nim.slot):
-                               need_scan = False                               
 
                        if need_scan:
                                nims_to_scan.append(nim)