1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-21 00:12:06 +02:00

* Also delete Lucene analyzer, just to be totally safe.

* Don't get stuck displaying "Scanning 0 tracks" when there are no updates to our collection found.
This commit is contained in:
Christian Muehlhaeuser 2011-02-16 07:05:11 +01:00
parent 87b0cf5832
commit 433654291d
2 changed files with 5 additions and 3 deletions

View File

@ -58,12 +58,14 @@ FuzzyIndex::beginIndexing()
delete m_luceneSearcher;
delete m_luceneReader;
delete m_luceneDir;
delete m_analyzer;
m_luceneSearcher = 0;
m_luceneReader = 0;
qDebug() << "Creating new lucene directory.";
QString lucenePath = TomahawkUtils::appDataDir().absoluteFilePath( "tomahawk.lucene" );
m_luceneDir = FSDirectory::getDirectory( lucenePath.toStdString().c_str(), true );
m_analyzer = _CLNEW SimpleAnalyzer();
}
qDebug() << "Creating new index writer.";

View File

@ -64,7 +64,6 @@ MusicScanner::setMtimes( const QMap<QString, unsigned int>& m )
void
MusicScanner::scan()
{
SourceList::instance()->getLocal()->scanningProgress( 0 );
qDebug() << "Scanning, num saved mtimes from last scan:" << m_dirmtimes.size();
connect( this, SIGNAL( batchReady( QVariantList ) ),
@ -177,8 +176,9 @@ MusicScanner::readFile( const QFileInfo& fi )
return QVariantMap(); // invalid extension
}
if( m_scanned % 3 == 0 )
SourceList::instance()->getLocal()->scanningProgress( m_scanned );
if ( m_scanned )
if( m_scanned % 3 == 0 )
SourceList::instance()->getLocal()->scanningProgress( m_scanned );
if( m_scanned % 100 == 0 )
qDebug() << "SCAN" << m_scanned << fi.absoluteFilePath();