aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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.