[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bamarok=5D_src/core-impl/collections/db/sql=3A_Fix_D?=
From: "Peter C.Ndikuwera" <pndiku () gmail ! com>
Date: 2011-03-17 19:19:21
Message-ID: 20110317191921.59EE4A60AE () git ! kde ! org
[Download RAW message or body]
Git commit 89635d1df5891033283da924fc55dae36ee868e2 by Peter C. Ndikuwera.
Committed on 17/03/2011 at 20:12.
Pushed by pndiku into branch 'master'.
Fix Dynamic Collection/scanning of unmounted device
BUG: 268739
Ok, fixing my own bug report here. Collection Scanner should only scan
urls on mounted devices.
M +9 -1 src/core-impl/collections/db/sql/SqlScanResultProcessor.cpp
http://commits.kde.org/amarok/89635d1df5891033283da924fc55dae36ee868e2
diff --git a/src/core-impl/collections/db/sql/SqlScanResultProcessor.cpp \
b/src/core-impl/collections/db/sql/SqlScanResultProcessor.cpp index f58952e..b428063 \
100644
--- a/src/core-impl/collections/db/sql/SqlScanResultProcessor.cpp
+++ b/src/core-impl/collections/db/sql/SqlScanResultProcessor.cpp
@@ -385,8 +385,16 @@ void
SqlScanResultProcessor::cacheUrlsInit()
{
SqlStorage *storage = m_collection->sqlStorage();
+ QList<int> idList = m_collection->mountPointManager()->getMountedDeviceIds();
+ QString deviceIds;
- QString query = QString( "SELECT id, deviceid, rpath, directory, uniqueid FROM \
urls;"); + foreach( int id, idList )
+ {
+ if ( !deviceIds.isEmpty() ) deviceIds += ',';
+ deviceIds += QString::number( id );
+ }
+
+ QString query = QString( "SELECT id, deviceid, rpath, directory, uniqueid FROM \
urls WHERE deviceid IN (%1);").arg( deviceIds ); QStringList res = storage->query( \
query );
for( int i = 0; i < res.count(); )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic