From ba54b5ce8ea7e0ea58f1112bd6ddd06746dfe8b1 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Sat, 30 Jun 2012 16:51:26 -0400 Subject: [PATCH] Don't blindly queue scan paths, there may be some queued --- src/libtomahawk/filemetadata/ScanManager.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libtomahawk/filemetadata/ScanManager.cpp b/src/libtomahawk/filemetadata/ScanManager.cpp index a6381bccd..9b568440a 100644 --- a/src/libtomahawk/filemetadata/ScanManager.cpp +++ b/src/libtomahawk/filemetadata/ScanManager.cpp @@ -277,8 +277,13 @@ ScanManager::scannerFinished() m_musicScannerThreadController = 0; } - switch ( m_queuedScanType ) { + SourceList::instance()->getLocal()->scanningFinished( 0 ); + emit finished(); + if ( !m_queuedScanType == File ) + m_currScannerPaths.clear(); + switch ( m_queuedScanType ) + { case Full: case Normal: QMetaObject::invokeMethod( this, "runNormalScan", Qt::QueuedConnection, Q_ARG( bool, m_queuedScanType == Full ) ); @@ -289,10 +294,7 @@ ScanManager::scannerFinished() default: break; } - m_queuedScanType = None; + m_scanTimer->start(); - m_currScannerPaths.clear(); - SourceList::instance()->getLocal()->scanningFinished( 0 ); - emit finished(); }