From e3f8fbd73904262462806e2972799665a3feee57 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 22 Sep 2022 08:39:16 -0500 Subject: remove restrictions on browse, list, and search while scan is in progress --- src/slskd/Shares/SharedFileCache.cs | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/slskd/Shares/SharedFileCache.cs') 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 /// The contents of the cache. public IEnumerable 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(); - } - var directories = new ConcurrentDictionary(); // 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 /// The contents of the directory. 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 /// The matching files. public IEnumerable Search(SearchQuery query) { - if (!State.CurrentValue.Filled) - { - return Enumerable.Empty(); - } - string Clean(string str) => str.Replace("/", " ") .Replace("\\", " ") .Replace(":", " ") -- cgit v1.2.3