diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application/Service.cs | 7 | ||||
| -rw-r--r-- | src/slskd/Application/ServiceState.cs | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/slskd/Application/Service.cs b/src/slskd/Application/Service.cs index 3d019dd3..8b88e8ff 100644 --- a/src/slskd/Application/Service.cs +++ b/src/slskd/Application/Service.cs @@ -226,6 +226,13 @@ namespace slskd pendingReconnect |= requiresReconnect; } + if (PreviousOptions.Directories.Shared.Except(newOptions.Directories.Shared).Any() + || newOptions.Directories.Shared.Except(PreviousOptions.Directories.Shared).Any()) + { + StateMonitor.SetValue(state => state with { PendingReconnect = true }); + Logger.Information("Shared directory 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); diff --git a/src/slskd/Application/ServiceState.cs b/src/slskd/Application/ServiceState.cs index 67671947..a1339d40 100644 --- a/src/slskd/Application/ServiceState.cs +++ b/src/slskd/Application/ServiceState.cs @@ -24,5 +24,6 @@ namespace slskd { public bool PendingReconnect { get; init; } public bool PendingRestart { get; init; } + public bool PendingRescan { get; init; } } }
\ No newline at end of file |
