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:
@@ -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() )
|
||||||
{
|
{
|
||||||
|
@@ -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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user