Do AddOrUpdateSongs in database thread
This commit is contained in:
@@ -411,6 +411,10 @@ void CollectionBackend::AddOrUpdateSubdirs(const SubdirectoryList &subdirs) {
|
||||
|
||||
}
|
||||
|
||||
void CollectionBackend::AddOrUpdateSongsAsync(const SongList &songs) {
|
||||
metaObject()->invokeMethod(this, "AddOrUpdateSongs", Qt::QueuedConnection, Q_ARG(SongList, songs));
|
||||
}
|
||||
|
||||
void CollectionBackend::AddOrUpdateSongs(const SongList &songs) {
|
||||
|
||||
QMutexLocker l(db_->Mutex());
|
||||
|
||||
@@ -186,6 +186,8 @@ class CollectionBackend : public CollectionBackendInterface {
|
||||
|
||||
Song::Source Source() const;
|
||||
|
||||
void AddOrUpdateSongsAsync(const SongList &songs);
|
||||
|
||||
public slots:
|
||||
void Exit();
|
||||
void LoadDirectories();
|
||||
|
||||
Reference in New Issue
Block a user