mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-22 05:33:32 +02:00
Fix dupes if you add a collection subfolder to your collection again
This commit is contained in:
@@ -286,6 +286,8 @@ MusicScanner::postOps()
|
|||||||
m_filesToDelete.clear();
|
m_filesToDelete.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_processedFiles.clear();
|
||||||
|
|
||||||
if ( !m_cmdQueue )
|
if ( !m_cmdQueue )
|
||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
@@ -348,6 +350,13 @@ MusicScanner::commandFinished()
|
|||||||
void
|
void
|
||||||
MusicScanner::scanFile( const QFileInfo& fi )
|
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.contains( "file://" + fi.canonicalFilePath() ) )
|
||||||
{
|
{
|
||||||
if ( !m_filemtimes.value( "file://" + fi.canonicalFilePath() ).values().isEmpty() &&
|
if ( !m_filemtimes.value( "file://" + fi.canonicalFilePath() ).values().isEmpty() &&
|
||||||
|
@@ -158,6 +158,7 @@ private:
|
|||||||
|
|
||||||
unsigned int m_cmdQueue;
|
unsigned int m_cmdQueue;
|
||||||
|
|
||||||
|
QSet< QString > m_processedFiles;
|
||||||
QVariantList m_scannedfiles;
|
QVariantList m_scannedfiles;
|
||||||
QVariantList m_filesToDelete;
|
QVariantList m_filesToDelete;
|
||||||
quint32 m_batchsize;
|
quint32 m_batchsize;
|
||||||
|
Reference in New Issue
Block a user