extragear/multimedia/amarok/src/collectionscanner

Seb Ruiz ruiz at kde.org
Tue Jul 22 12:24:55 CEST 2008


SVN commit 836466 by seb:

Re-instate lost logic for doing incremental scans for the collection scanner. This can't actually be completed until we have a DBus interface into the collection to check whether files are already part of the collection.
Peter: can this be acheived easily?
CCMAIL: amarok-devel at kde.org


 M  +11 -2     CollectionScanner.cpp  
 M  +0 -1      CollectionScanner.h  


--- trunk/extragear/multimedia/amarok/src/collectionscanner/CollectionScanner.cpp #836465:836466
@@ -87,7 +87,6 @@
 
 CollectionScanner::~CollectionScanner()
 {
-
 }
 
 
@@ -194,7 +193,17 @@
 
         if( f.isDir() && m_recursively && !m_scannedFolders.contains( f.canonicalFilePath() ) )
         {
-            readDir( f.absoluteFilePath() + '/', entries );
+            bool isInCollection = false;
+            if( m_incremental )
+            {
+                // TODO: Check whether the directory is in the collection
+                // use dbus or other similar method to query Amarok core
+                // @see http://websvn.kde.org/trunk/extragear/multimedia/amarok/src/collectionscanner/CollectionScanner.cpp?revision=631604&view=markup
+                // isInCollection = ???;
+            }
+
+            if( !m_incremental || !isInCollection )
+                readDir( f.absoluteFilePath() + '/', entries );
         }
         else if( f.isFile() )
             entries.append( f.absoluteFilePath() );
--- trunk/extragear/multimedia/amarok/src/collectionscanner/CollectionScanner.h #836465:836466
@@ -111,7 +111,6 @@
     const bool    m_restart;
     const QString m_logfile;
     QStringList   m_scannedFolders;
-
 };
 
 


More information about the Amarok-devel mailing list