mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-15 10:14:43 +01:00
Fix rescan when collection directory is removed and added
This commit is contained in:
parent
4983c1cfc9
commit
460d045cbe
@ -908,8 +908,18 @@ void CollectionWatcher::PerformScan(bool incremental, bool ignore_mtimes) {
|
||||
for (const Directory &dir : dirs) {
|
||||
|
||||
if (stop_requested_) break;
|
||||
|
||||
ScanTransaction transaction(this, dir.id, incremental, ignore_mtimes, mark_songs_unavailable_);
|
||||
SubdirectoryList subdirs(transaction.GetAllSubdirs());
|
||||
|
||||
if (subdirs.isEmpty()) {
|
||||
qLog(Debug) << "Collection directory wasn't in subdir list.";
|
||||
Subdirectory subdir;
|
||||
subdir.path = dir.path;
|
||||
subdir.directory_id = dir.id;
|
||||
subdirs << subdir;
|
||||
}
|
||||
|
||||
transaction.AddToProgressMax(subdirs.count());
|
||||
|
||||
for (const Subdirectory &subdir : subdirs) {
|
||||
|
Loading…
Reference in New Issue
Block a user