mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-22 00:42:04 +02:00
* We need to tell source to update the index in the right thread.
This commit is contained in:
parent
493cf75470
commit
5e0390bd87
src/libtomahawk
@ -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() );
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ MusicScanner::scan()
|
||||
scanFilePaths();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
m_dirListerThreadController = new QThread( this );
|
||||
|
||||
m_dirLister = QWeakPointer< DirLister >( new DirLister( m_paths ) );
|
||||
@ -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();
|
||||
@ -366,7 +367,7 @@ MusicScanner::readFile( const QFileInfo& fi )
|
||||
|
||||
int bitrate = 0;
|
||||
int duration = 0;
|
||||
|
||||
|
||||
Tag *tag = Tag::fromFile( f );
|
||||
if ( f.audioProperties() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user