From 48548c7eb96fb723f67aea71dc9760581b41ac68 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 30 May 2022 16:10:45 -0500 Subject: simplify share state --- src/slskd/State.cs | 67 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/slskd/State.cs b/src/slskd/State.cs index 05a96a76..863c59da 100644 --- a/src/slskd/State.cs +++ b/src/slskd/State.cs @@ -80,45 +80,48 @@ namespace slskd /// public record ShareState { - public CacheState Cache { get; init; } = new CacheState(); public bool ScanPending { get; init; } + public bool Scanning { get; init; } + public double ScanProgress { get; init; } + public int Directories { get; init; } + public int Files { get; init; } + } - public record CacheState - { - /// - /// Gets a value indicating whether the cache is being filled. - /// - public bool Filling { get; init; } = false; + public record SharedFileCacheState + { + /// + /// Gets a value indicating whether the cache is being filled. + /// + public bool Filling { get; init; } = false; - /// - /// Gets a value indicating whether the cache is filled. - /// - public bool Filled { get; init; } = false; + /// + /// Gets a value indicating whether the cache is filled. + /// + public bool Filled { get; init; } = false; - /// - /// Gets a value indicating whether the cache is faulted. - /// - public bool Faulted { get; init; } = false; + /// + /// Gets a value indicating whether the cache is faulted. + /// + public bool Faulted { get; init; } = false; - /// - /// Gets the current fill progress. - /// - public double FillProgress { get; init; } + /// + /// Gets the current fill progress. + /// + public double FillProgress { get; init; } - /// - /// Gets the number of cached directories. - /// - public int Directories { get; init; } + /// + /// Gets the number of cached directories. + /// + public int Directories { get; init; } - /// - /// Gets the number of cached files. - /// - public int Files { get; init; } + /// + /// Gets the number of cached files. + /// + public int Files { get; init; } - /// - /// Gets the number of directories excluded by filters. - /// - public int ExcludedDirectories { get; init; } - } + /// + /// Gets the number of directories excluded by filters. + /// + public int ExcludedDirectories { get; init; } } } \ No newline at end of file -- cgit v1.2.3