aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares/SharedFileCache.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-09-22 08:39:16 -0500
committerJP Dillingham <jp@dillingham.me>2022-09-22 08:39:16 -0500
commite3f8fbd73904262462806e2972799665a3feee57 (patch)
tree5ceb71e3831e9dbe474102139dee5b60332412fc /src/slskd/Shares/SharedFileCache.cs
parenta9853bc7f355dfa5b3cc8d9ca1e7dc3d5b48e17c (diff)
downloadslskd-e3f8fbd73904262462806e2972799665a3feee57.tar.gz
remove restrictions on browse, list, and search while scan is in progress
Diffstat (limited to 'src/slskd/Shares/SharedFileCache.cs')
-rw-r--r--src/slskd/Shares/SharedFileCache.cs25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/slskd/Shares/SharedFileCache.cs b/src/slskd/Shares/SharedFileCache.cs
index a42e8179..6967e44a 100644
--- a/src/slskd/Shares/SharedFileCache.cs
+++ b/src/slskd/Shares/SharedFileCache.cs
@@ -71,16 +71,6 @@ namespace slskd.Shares
/// <returns>The contents of the cache.</returns>
public IEnumerable<Directory> Browse()
{
- if (!State.CurrentValue.Filled)
- {
- if (State.CurrentValue.Filling)
- {
- return new[] { new Directory("Scanning shares, please check back in a few minutes.") };
- }
-
- return Enumerable.Empty<Directory>();
- }
-
var directories = new ConcurrentDictionary<string, Directory>();
// Soulseek requires that each directory in the tree have an entry in the list returned in a browse response. if
@@ -382,16 +372,6 @@ namespace slskd.Shares
/// <returns>The contents of the directory.</returns>
public Directory List(string directory)
{
- if (!State.CurrentValue.Filled)
- {
- if (State.CurrentValue.Filling)
- {
- return new Directory(directory, new[] { new File(1, "Scanning shares, please check back in a few minutes.", 0, string.Empty) });
- }
-
- return null;
- }
-
var files = ListFiles(directory);
return new Directory(directory, files);
}
@@ -428,11 +408,6 @@ namespace slskd.Shares
/// <returns>The matching files.</returns>
public IEnumerable<File> Search(SearchQuery query)
{
- if (!State.CurrentValue.Filled)
- {
- return Enumerable.Empty<File>();
- }
-
string Clean(string str) => str.Replace("/", " ")
.Replace("\\", " ")
.Replace(":", " ")