CollectionWatcher: Connect PathChanged signal once

This commit is contained in:
Jonas Kvinge 2023-05-03 01:17:10 +02:00
parent 7e1077426e
commit 84e7cd0df8
1 changed files with 1 additions and 1 deletions

View File

@ -108,6 +108,7 @@ CollectionWatcher::CollectionWatcher(Song::Source source, QObject *parent)
ReloadSettings();
QObject::connect(fs_watcher_, &FileSystemWatcherInterface::PathChanged, this, &CollectionWatcher::DirectoryChanged, Qt::UniqueConnection);
QObject::connect(rescan_timer_, &QTimer::timeout, this, &CollectionWatcher::RescanPathsNow);
QObject::connect(periodic_scan_timer_, &QTimer::timeout, this, &CollectionWatcher::IncrementalScanCheck);
@ -916,7 +917,6 @@ void CollectionWatcher::AddWatch(const CollectionDirectory &dir, const QString &
if (!QFile::exists(path)) return;
QObject::connect(fs_watcher_, &FileSystemWatcherInterface::PathChanged, this, &CollectionWatcher::DirectoryChanged, Qt::UniqueConnection);
fs_watcher_->AddPath(path);
subdir_mapping_[path] = dir;