aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-08-24 08:25:03 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-08-24 08:25:03 -0500
commit6795ced13828958514fbf65323e824da257c0f9d (patch)
tree475feb73f5486c04826d552d6ad59d0187984040 /src
parentbc08e38a614eda311f5eca38029816b5fcabc1a5 (diff)
downloadslskd-6795ced13828958514fbf65323e824da257c0f9d.tar.gz
require share rescan on filter change
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application/Application.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/slskd/Application/Application.cs b/src/slskd/Application/Application.cs
index c317f467..6d2bd0bb 100644
--- a/src/slskd/Application/Application.cs
+++ b/src/slskd/Application/Application.cs
@@ -241,6 +241,13 @@ namespace slskd
Logger.Information("Shared directory configuration changed. Shares must be re-scanned for changes to take effect.");
}
+ if (PreviousOptions.Filters.File.Except(newOptions.Filters.File).Any()
+ || newOptions.Filters.File.Except(PreviousOptions.Filters.File).Any())
+ {
+ StateMonitor.SetValue(state => state with { PendingShareRescan = true });
+ Logger.Information("File filter configuration changed. Shares must be re-scanned for changes to take effect.");
+ }
+
// determine whether any Soulseek options changed. if so, we need to construct a patch
// and invoke ReconfigureOptionsAsync().
var slskDiff = PreviousOptions.Soulseek.DiffWith(newOptions.Soulseek);