save lamedb after scan
authorFelix Domke <tmbinc@elitedvb.net>
Thu, 17 Nov 2005 12:37:58 +0000 (12:37 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Thu, 17 Nov 2005 12:37:58 +0000 (12:37 +0000)
lib/components/scan.cpp
lib/dvb/db.cpp
lib/dvb/db.h
lib/dvb/idvb.h

index 6676af51d9ac4010f1238629519f03c3607938fd..2f3c4d62a3593021a987550947603b65cd684c66 100644 (file)
@@ -28,6 +28,7 @@ void eComponentScan::scanEvent(int evt)
                } else
                {
                        m_scan->insertInto(db);
+                       db->flush();
                        eDebug("scan done!");
                }
        }
index 3f42da96c382408cb764ea1bbdae207b06242276..2665877a0d2dcb23ca5f84f91bbe987fa39e53fb 100644 (file)
@@ -641,6 +641,12 @@ RESULT eDVBDB::getService(const eServiceReferenceDVB &reference, ePtr<eDVBServic
        return 0;
 }
 
+RESULT eDVBDB::flush()
+{
+       save();
+       return 0;
+}
+
 RESULT eDVBDB::getBouquet(const eServiceReference &ref, eBouquet* &bouquet)
 {
        std::string str = ref.path;
index a7350e7812c3c362b6b261f0dbc60ecb1db56cee..3483e244e7170c303b623247a79d101498cca7ee 100644 (file)
@@ -42,6 +42,7 @@ public:
        
        RESULT addService(const eServiceReferenceDVB &service, eDVBService *service);
        RESULT getService(const eServiceReferenceDVB &reference, ePtr<eDVBService> &service);
+       RESULT flush();
 
        RESULT startQuery(ePtr<iDVBChannelListQuery> &query, eDVBChannelQuery *query, const eServiceReference &source);
 
index f97022d5857ad1e8fa48be922dd24fa7d0962970..483c395b35c8fdda0addf74fb4df16391b1541b5 100644 (file)
@@ -279,6 +279,7 @@ public:
        
        virtual RESULT addService(const eServiceReferenceDVB &service, eDVBService *service)=0;
        virtual RESULT getService(const eServiceReferenceDVB &reference, ePtr<eDVBService> &service)=0;
+       virtual RESULT flush()=0;
 
        virtual RESULT getBouquet(const eServiceReference &ref,  eBouquet* &bouquet)=0;