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:
parent
051f922e10
commit
65e0491b53
@ -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() &&
|
||||
|
@ -158,6 +158,7 @@ private:
|
||||
|
||||
unsigned int m_cmdQueue;
|
||||
|
||||
QSet< QString > m_processedFiles;
|
||||
QVariantList m_scannedfiles;
|
||||
QVariantList m_filesToDelete;
|
||||
quint32 m_batchsize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user