diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-06-02 07:28:26 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-06-02 07:28:26 -0500 |
| commit | ce6f897644ab0603e1ccb1ece3b6c9036d4bf5c4 (patch) | |
| tree | 91f93fe9fc9c19e0cc884e0091367930b0055e79 /src | |
| parent | 2efd8278ce9a5a895fe0c75bd95080ecc386163b (diff) | |
| download | slskd-ce6f897644ab0603e1ccb1ece3b6c9036d4bf5c4.tar.gz | |
change how share state is stored
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 880e8f74..0144daa2 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -679,14 +679,14 @@ namespace slskd if (PreviousOptions.Directories.Shared.Except(newOptions.Directories.Shared).Any() || newOptions.Directories.Shared.Except(PreviousOptions.Directories.Shared).Any()) { - State.SetValue(state => state with { PendingShareRescan = true }); + State.SetValue(state => state with { Shares = state.Shares with { ScanPending = true } }); Log.Information("Shared directory configuration changed. Shares must be re-scanned for changes to take effect."); } if (PreviousOptions.Filters.Share.Except(newOptions.Filters.Share).Any() || newOptions.Filters.Share.Except(PreviousOptions.Filters.Share).Any()) { - State.SetValue(state => state with { PendingShareRescan = true }); + State.SetValue(state => state with { Shares = state.Shares with { ScanPending = true } }); Log.Information("File filter configuration changed. Shares must be re-scanned for changes to take effect."); } @@ -875,7 +875,7 @@ namespace slskd } else { - State.SetValue(s => s with { PendingShareRescan = false }); + State.SetValue(state => state with { Shares = state.Shares with { ScanPending = false } }); Log.Information("Shares scanned successfully. Found {Directories} directories and {Files} files in {Duration}ms", current.Directories, current.Files, (DateTime.UtcNow - SharesRefreshStarted).TotalMilliseconds); SharesRefreshStarted = default; |
