1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 07:36:48 +02:00

Add some debugging for Chris and fix duplicate paths being queued

This commit is contained in:
Jeff Mitchell
2011-04-02 19:29:53 -04:00
parent d2e867b9ee
commit a848561e60
2 changed files with 4 additions and 1 deletions

View File

@@ -67,6 +67,8 @@ DirLister::scanDir( QDir dir, int depth, DirLister::Mode mode )
foreach( const QFileInfo& di, dirs ) foreach( const QFileInfo& di, dirs )
{ {
qDebug() << "Considering dir " << di.absoluteFilePath();
qDebug() << "m_dirtimes contains it? " << (m_dirmtimes.contains( di.absoluteFilePath() ) ? "true" : "false");
if( mode == DirLister::Recursive || !m_dirmtimes.contains( di.absoluteFilePath() ) ) if( mode == DirLister::Recursive || !m_dirmtimes.contains( di.absoluteFilePath() ) )
scanDir( di.absoluteFilePath(), depth + 1, DirLister::Recursive ); scanDir( di.absoluteFilePath(), depth + 1, DirLister::Recursive );
else //should be the non-recursive case since the second test above should only happen with a new dir else //should be the non-recursive case since the second test above should only happen with a new dir

View File

@@ -219,7 +219,8 @@ ScanManager::handleChangedDir( const QString& path )
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
qDebug() << "Dir changed: " << path; qDebug() << "Dir changed: " << path;
m_queuedChangedDirs << path; if( !m_queuedChangedDirs.contains( path ) )
m_queuedChangedDirs << path;
if( TomahawkSettings::instance()->watchForChanges() ) if( TomahawkSettings::instance()->watchForChanges() )
m_queuedScanTimer->start( 10000 ); m_queuedScanTimer->start( 10000 );
} }