1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-13 20:39:57 +01:00

Fix dupes if you add a collection subfolder to your collection again

This commit is contained in:
Dominik Schmidt 2014-11-13 02:43:13 +01:00
parent 051f922e10
commit 65e0491b53
2 changed files with 10 additions and 0 deletions

View File

@ -286,6 +286,8 @@ MusicScanner::postOps()
m_filesToDelete.clear();
}
m_processedFiles.clear();
if ( !m_cmdQueue )
cleanup();
}
@ -348,6 +350,13 @@ MusicScanner::commandFinished()
void
MusicScanner::scanFile( const QFileInfo& fi )
{
// Don't process a single file twice, this might happen if you add a subfolder of another collection folder to your collection
if ( m_processedFiles.contains( fi.canonicalFilePath() ) )
return;
else
m_processedFiles << fi.canonicalFilePath();
if ( m_filemtimes.contains( "file://" + fi.canonicalFilePath() ) )
{
if ( !m_filemtimes.value( "file://" + fi.canonicalFilePath() ).values().isEmpty() &&

View File

@ -158,6 +158,7 @@ private:
unsigned int m_cmdQueue;
QSet< QString > m_processedFiles;
QVariantList m_scannedfiles;
QVariantList m_filesToDelete;
quint32 m_batchsize;