aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-02-25 14:37:07 -0600
committerJP Dillingham <jp@dillingham.me>2024-02-25 14:37:07 -0600
commit1fd51e9ffadc263942ca36e5e9b1209138bf3e88 (patch)
tree121b2c6cbb3997a513baf52178f28a6a0504a319 /src
parent92e5bd61becad8877d2733696260556db6c8a514 (diff)
downloadslskd-1fd51e9ffadc263942ca36e5e9b1209138bf3e88.tar.gz
move handler to private function
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs
index a3bea5b2..75b2eee6 100644
--- a/src/slskd/Application.cs
+++ b/src/slskd/Application.cs
@@ -181,7 +181,7 @@ namespace slskd
Client.DownloadDenied += (e, args) => Log.Information("Download of {Filename} from {Username} was denied: {Message}", args.Filename, args.Username, args.Message);
Client.DownloadFailed += (e, args) => Log.Information("Download of {Filename} from {Username} failed", args.Filename, args.Username);
- Client.ExcludedSearchPhrasesReceived += (e, args) => ExcludedSearchPhrases = args;
+ Client.ExcludedSearchPhrasesReceived += Client_ExcludedSearchPhrasesReceived;
ConnectionWatchdog = connectionWatchdog;
@@ -1096,6 +1096,12 @@ namespace slskd
}
}
+ private void Client_ExcludedSearchPhrasesReceived(object sender, IReadOnlyCollection<string> e)
+ {
+ Log.Debug("Excluded search phrases: {Phrases}", string.Join(", ", e));
+ ExcludedSearchPhrases = e;
+ }
+
private void Client_TransferProgressUpdated(object sender, TransferProgressUpdatedEventArgs args)
{
// no-op. this is really verbose, use for troubleshooting.
@@ -1369,7 +1375,7 @@ namespace slskd
// sometimes clients send search queries consisting only of exclusions; drop them.
// no other clients send search results for these, even though it is technically possible.
- if (!query.Terms.Any())
+ if (query.Terms.Count == 0)
{
return null;
}