aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-05-29 10:21:44 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-05-29 10:21:44 -0500
commitc3108fcdb83d1c4ad032971dcb2be1d9bdc04983 (patch)
tree8a57a7f37024573f949c14668640e902d0c1949f /src
parent6532946913e03086cb7a9f308770b52265b98b98 (diff)
downloadslskd-c3108fcdb83d1c4ad032971dcb2be1d9bdc04983.tar.gz
tidy up
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Core/Search/Domain/Search.cs35
1 files changed, 11 insertions, 24 deletions
diff --git a/src/slskd/Core/Search/Domain/Search.cs b/src/slskd/Core/Search/Domain/Search.cs
index b5ed8e4a..e89caf54 100644
--- a/src/slskd/Core/Search/Domain/Search.cs
+++ b/src/slskd/Core/Search/Domain/Search.cs
@@ -27,17 +27,17 @@ namespace slskd.Search
public class Search
{
+ public DateTime? EndedAt { get; set; }
+ public int FileCount { get; set; }
+
[Key]
public Guid Id { get; init; }
- public DateTime StartedAt { get; init; } = DateTime.UtcNow;
- public DateTime? EndedAt { get; set; }
- public int FileCount { get; set; }
public int LockedFileCount { get; set; }
public int ResponseCount { get; set; }
- public string SearchText { get; init; }
- public SearchStates State { get; set; }
- public int Token { get; init; }
+
+ [NotMapped]
+ public IEnumerable<Response> Responses { get; set; } = new List<Response>();
[JsonIgnore]
public string ResponsesJson
@@ -49,22 +49,9 @@ namespace slskd.Search
}
}
- [NotMapped]
- public IEnumerable<Response> Responses { get; set; } = new List<Response>();
-
- public Search UpdateFromSoulseekSearch(Soulseek.Search search)
- {
- FileCount = search.FileCount;
- LockedFileCount = search.LockedFileCount;
- ResponseCount = search.ResponseCount;
- State = search.State;
- return this;
- }
-
- public Search AddResponses(List<Response> responses)
- {
- Responses = responses;
- return this;
- }
+ public string SearchText { get; init; }
+ public DateTime StartedAt { get; init; } = DateTime.UtcNow;
+ public SearchStates State { get; set; }
+ public int Token { get; init; }
}
-}
+} \ No newline at end of file