aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-12-27 12:12:43 -0600
committerJP Dillingham <jp@dillingham.me>2023-12-27 12:12:43 -0600
commit348055d687d1a748e435b4ede4e7db4ca5616609 (patch)
treec779190f96dd39ad15617a0d9a6892accd2df256 /src/slskd/Shares
parentbd338423afb1f8d361deccfd4786e7ec4b27e8dc (diff)
downloadslskd-348055d687d1a748e435b4ede4e7db4ca5616609.tar.gz
list options
Diffstat (limited to 'src/slskd/Shares')
-rw-r--r--src/slskd/Shares/IShareService.cs7
-rw-r--r--src/slskd/Shares/ShareService.cs9
2 files changed, 9 insertions, 7 deletions
diff --git a/src/slskd/Shares/IShareService.cs b/src/slskd/Shares/IShareService.cs
index 957b0639..39e5975c 100644
--- a/src/slskd/Shares/IShareService.cs
+++ b/src/slskd/Shares/IShareService.cs
@@ -77,11 +77,12 @@ namespace slskd.Shares
Task<Directory> ListDirectoryAsync(string directory);
/// <summary>
- /// Returns the list of all <see cref="Scan"/> records matching the specified <paramref name="predicate"/>.
+ /// Returns the list of all <see cref="Scan"/> started at or after the specified <paramref name="startedAtOrAfter"/>
+ /// unix timestamp.
/// </summary>
- /// <param name="predicate">An optional expression used to locate scans.</param>
+ /// <param name="startedAtOrAfter">A unix timestamp that serves as the lower bound of the time-based listing.</param>
/// <returns>The operation context, including the list of found scans.</returns>
- Task<IEnumerable<Scan>> ListScansAsync(Expression<Func<Scan, bool>> predicate = null);
+ Task<IEnumerable<Scan>> ListScansAsync(long startedAtOrAfter = 0);
/// <summary>
/// Requests that a share scan is performed.
diff --git a/src/slskd/Shares/ShareService.cs b/src/slskd/Shares/ShareService.cs
index c1622ee4..6b5fdd07 100644
--- a/src/slskd/Shares/ShareService.cs
+++ b/src/slskd/Shares/ShareService.cs
@@ -308,12 +308,13 @@ namespace slskd.Shares
}
/// <summary>
- /// Returns the list of all <see cref="Scan"/> records matching the specified <paramref name="predicate"/>.
+ /// Returns the list of all <see cref="Scan"/> started at or after the specified <paramref name="startedAtOrAfter"/>
+ /// unix timestamp.
/// </summary>
- /// <param name="predicate">An optional expression used to locate scans.</param>
+ /// <param name="startedAtOrAfter">A unix timestamp that serves as the lower bound of the time-based listing.</param>
/// <returns>The operation context, including the list of found scans.</returns>
- public Task<IEnumerable<Scan>> ListScansAsync(Expression<Func<Scan, bool>> predicate = null)
- => Task.FromResult(Local.Repository.ListScans(predicate));
+ public Task<IEnumerable<Scan>> ListScansAsync(long startedAtOrAfter = 0)
+ => Task.FromResult(Local.Repository.ListScans(startedAtOrAfter));
/// <summary>
/// Requests that a share scan is performed.