do not ask to scan on tuner 0 when not needed
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 22 May 2006 13:19:24 +0000 (13:19 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 22 May 2006 13:19:24 +0000 (13:19 +0000)
lib/components/scan.cpp
lib/dvb/sec.cpp
lib/python/Screens/ScanSetup.py

index c21e8f4bf3a706e5fa81b80c7696cac956e69ae1..5355208f69dcdcac12542032fe6dfa4c1ffe10f0 100644 (file)
@@ -8,7 +8,7 @@ DEFINE_REF(eComponentScan);
 
 void eComponentScan::scanEvent(int evt)
 {
-       eDebug("scan event %d!", evt);
+//     eDebug("scan event %d!", evt);
        
        if (evt == eDVBScan::evtFinish)
        {
@@ -107,7 +107,7 @@ int eComponentScan::start(int feid, int flags)
 
        std::list<ePtr<iDVBFrontendParameters> > list;
                
-       m_scan = new eDVBScan(channel);
+       m_scan = new eDVBScan(channel, true);
        m_scan->connectEvent(slot(*this, &eComponentScan::scanEvent), m_scan_event_connection);
        m_scan->start(m_initial, flags);
        
index 2a35ba148f7f6f432c58c91ddbff469505bf6b37..f91824dcb554448f7448e974bf4847b6cd5f5c2c 100644 (file)
@@ -1113,6 +1113,7 @@ PyObject *eDVBSatelliteEquipmentControl::get_exclusive_satellites(int tu1, int t
                        else if (cnt == tu2)
                                p2 = *it;
                }
+
                if (p1 && p2)
                {
                        // check for linked tuners
@@ -1145,10 +1146,12 @@ PyObject *eDVBSatelliteEquipmentControl::get_exclusive_satellites(int tu1, int t
                                int tmp2=-1;
                                // check for rotor dependency
                                p1->m_frontend->getData(eDVBFrontend::SATPOS_DEPENDS_PTR, tmp1);
+                               if (tmp1 != -1)
+                                       p1 = (void*)tmp1;
                                p2->m_frontend->getData(eDVBFrontend::SATPOS_DEPENDS_PTR, tmp2);
-                               if (tmp1 != -1 && (void*)tmp1 != p2
-                                       && tmp2 != -1 && (void*)tmp2 != p1
-                                       && tmp1 != tmp2 )
+                               if (tmp2 != -1)
+                                       p2 = (void*)tmp2;
+                               if (p1 != p2)
                                {
                                        int tu1_mask = 1 << p1->m_frontend->getID(),
                                                tu2_mask = 1 << p2->m_frontend->getID();
index ff76d0205a64633d0cc9e3dd054cc4ca71ec269a..4983f768f8bd7c158f3f6665543b6380e79366bc 100644 (file)
@@ -601,11 +601,15 @@ class ScanSimple(Screen):
 
                nimcount = nimmanager.getNimSocketCount()
                if nimcount > 0:
+                       scan_possible=True
                        config.scan = ConfigSubsection()
                        config.scan.clearallservices = configElement_nonSave("config.scan.clearallservices", configSelection, 0, (("no", _("no")), ("yes", _("yes")), ("yes_hold_feeds", _("yes (hold feeds)"))))
                        self.list.append(getConfigListEntry(_("Clear before scan"), config.scan.clearallservices))
                        nim = configElement_nonSave(0, configSelection, 0, (("yes", _("yes")), ("no", _("no"))))
-                       self.list.append(getConfigListEntry(_("Scan NIM") + " 0 (" + nimmanager.getNimTypeName(0) + ")", nim))
+                       if nimmanager.getNimType(0) == nimmanager.nimType["DVB-S"] and not len(nimmanager.getSatListForNim(0)):
+                               scan_possible=False
+                       if scan_possible:
+                               self.list.append(getConfigListEntry(_("Scan NIM") + " 0 (" + nimmanager.getNimTypeName(0) + ")", nim))
                if nimcount > 1 and self.ScanNimTwoNeeded():
                        nim = configElement_nonSave(1, configSelection, 0, (("yes", _("yes")), ("no", _("no"))))
                        self.list.append(getConfigListEntry(_("Scan NIM") + " 1 (" + nimmanager.getNimTypeName(1) + ")", nim))