From 6795ced13828958514fbf65323e824da257c0f9d Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 24 Aug 2021 08:25:03 -0500 Subject: require share rescan on filter change --- src/slskd/Application/Application.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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); -- cgit v1.2.3