diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-05-30 16:10:45 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-05-30 16:10:45 -0500 |
| commit | 48548c7eb96fb723f67aea71dc9760581b41ac68 (patch) | |
| tree | cf10d63d8da992420677dcf4f6a70d1bc4dc572b | |
| parent | b5557cc484f7a24b3a6f35d4e3398ffeddb4e371 (diff) | |
| download | slskd-48548c7eb96fb723f67aea71dc9760581b41ac68.tar.gz | |
simplify share state
| -rw-r--r-- | src/slskd/State.cs | 67 |
1 files changed, 35 insertions, 32 deletions
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 /// </summary> 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 - { - /// <summary> - /// Gets a value indicating whether the cache is being filled. - /// </summary> - public bool Filling { get; init; } = false; + public record SharedFileCacheState + { + /// <summary> + /// Gets a value indicating whether the cache is being filled. + /// </summary> + public bool Filling { get; init; } = false; - /// <summary> - /// Gets a value indicating whether the cache is filled. - /// </summary> - public bool Filled { get; init; } = false; + /// <summary> + /// Gets a value indicating whether the cache is filled. + /// </summary> + public bool Filled { get; init; } = false; - /// <summary> - /// Gets a value indicating whether the cache is faulted. - /// </summary> - public bool Faulted { get; init; } = false; + /// <summary> + /// Gets a value indicating whether the cache is faulted. + /// </summary> + public bool Faulted { get; init; } = false; - /// <summary> - /// Gets the current fill progress. - /// </summary> - public double FillProgress { get; init; } + /// <summary> + /// Gets the current fill progress. + /// </summary> + public double FillProgress { get; init; } - /// <summary> - /// Gets the number of cached directories. - /// </summary> - public int Directories { get; init; } + /// <summary> + /// Gets the number of cached directories. + /// </summary> + public int Directories { get; init; } - /// <summary> - /// Gets the number of cached files. - /// </summary> - public int Files { get; init; } + /// <summary> + /// Gets the number of cached files. + /// </summary> + public int Files { get; init; } - /// <summary> - /// Gets the number of directories excluded by filters. - /// </summary> - public int ExcludedDirectories { get; init; } - } + /// <summary> + /// Gets the number of directories excluded by filters. + /// </summary> + public int ExcludedDirectories { get; init; } } }
\ No newline at end of file |
