1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

Optimize the full rescan path a bit, and add a check for safety (that should be a noop)

This commit is contained in:
Jeff Mitchell
2011-10-10 09:53:55 -04:00
parent a7d30582a6
commit d37fd8955c
2 changed files with 5 additions and 2 deletions

View File

@@ -261,7 +261,9 @@ MusicScanner::listerFinished( const QMap<QString, unsigned int>& newmtimes )
m_filesToDelete << m_filemtimes[ key ].keys().first(); m_filesToDelete << m_filemtimes[ key ].keys().first();
} }
commitBatch( m_scannedfiles, m_filesToDelete ); commitBatch( m_scannedfiles, m_filesToDelete );
m_scannedfiles.clear();
m_filesToDelete.clear();
// remove obsolete / stale files // remove obsolete / stale files
foreach ( const QString& path, m_dirmtimes.keys() ) foreach ( const QString& path, m_dirmtimes.keys() )
{ {

View File

@@ -168,7 +168,8 @@ ScanManager::filesDeleted( const QStringList& files, const Tomahawk::collection_
{ {
Q_UNUSED( files ); Q_UNUSED( files );
Q_UNUSED( collection ); Q_UNUSED( collection );
runDirScan( TomahawkSettings::instance()->scannerPaths(), true ); if ( !TomahawkSettings::instance()->scannerPaths().isEmpty() )
runDirScan( TomahawkSettings::instance()->scannerPaths(), true );
} }