mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +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;
|
||||
added++;
|
||||
}
|
||||
|
||||
qDebug() << "Inserted" << added << "tracks to database";
|
||||
|
||||
if ( added )
|
||||
source()->updateIndexWhenSynced();
|
||||
|
||||
tDebug() << "Committing" << added << "tracks...";
|
||||
|
||||
emit done( m_files, source()->collection() );
|
||||
}
|
||||
|
@@ -237,6 +237,7 @@ MusicScanner::postOps()
|
||||
|
||||
if ( m_filesToDelete.length() || m_scannedfiles.length() )
|
||||
{
|
||||
SourceList::instance()->getLocal()->updateIndexWhenSynced();
|
||||
commitBatch( m_scannedfiles, m_filesToDelete );
|
||||
m_scannedfiles.clear();
|
||||
m_filesToDelete.clear();
|
||||
|
Reference in New Issue
Block a user