mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 22:56:42 +02:00
* We need to tell source to update the index in the right thread.
This commit is contained in:
@@ -162,11 +162,9 @@ DatabaseCommand_AddFiles::exec( DatabaseImpl* dbi )
|
|||||||
m_ids << fileid;
|
m_ids << fileid;
|
||||||
added++;
|
added++;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Inserted" << added << "tracks to database";
|
qDebug() << "Inserted" << added << "tracks to database";
|
||||||
|
|
||||||
if ( added )
|
|
||||||
source()->updateIndexWhenSynced();
|
|
||||||
|
|
||||||
tDebug() << "Committing" << added << "tracks...";
|
tDebug() << "Committing" << added << "tracks...";
|
||||||
|
|
||||||
emit done( m_files, source()->collection() );
|
emit done( m_files, source()->collection() );
|
||||||
}
|
}
|
||||||
|
@@ -237,6 +237,7 @@ MusicScanner::postOps()
|
|||||||
|
|
||||||
if ( m_filesToDelete.length() || m_scannedfiles.length() )
|
if ( m_filesToDelete.length() || m_scannedfiles.length() )
|
||||||
{
|
{
|
||||||
|
SourceList::instance()->getLocal()->updateIndexWhenSynced();
|
||||||
commitBatch( m_scannedfiles, m_filesToDelete );
|
commitBatch( m_scannedfiles, m_filesToDelete );
|
||||||
m_scannedfiles.clear();
|
m_scannedfiles.clear();
|
||||||
m_filesToDelete.clear();
|
m_filesToDelete.clear();
|
||||||
|
Reference in New Issue
Block a user