aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Transfers/API
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-05-04 22:13:44 -0500
committerJP Dillingham <jp@dillingham.me>2026-05-04 22:13:44 -0500
commit16aeb34e118ee2d4770bcace3aa06a7615a2eae6 (patch)
treed755f27134c22b33ac675b376fcd6f5c5fa441ac /src/slskd/Transfers/API
parent8508606e16aa5ed00ca9d3e19d85e576e383aa63 (diff)
downloadslskd-16aeb34e118ee2d4770bcace3aa06a7615a2eae6.tar.gz
tweak dto
Diffstat (limited to 'src/slskd/Transfers/API')
-rw-r--r--src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs (renamed from src/slskd/Transfers/API/DTO/EnqueueDownloadBatchRequest.cs)36
1 files changed, 33 insertions, 3 deletions
diff --git a/src/slskd/Transfers/API/DTO/EnqueueDownloadBatchRequest.cs b/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
index 28cc7859..0aaf1034 100644
--- a/src/slskd/Transfers/API/DTO/EnqueueDownloadBatchRequest.cs
+++ b/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
@@ -1,4 +1,4 @@
-// <copyright file="EnqueueDownloadBatchRequest.cs" company="JP Dillingham">
+// <copyright file="QueueDownloadBatchRequest.cs" company="JP Dillingham">
// ▄▄▄▄ ▄▄▄▄ ▄▄▄▄
// ▄▄▄▄▄▄█ █▄▄▄▄▄█ █▄▄▄▄▄█ █
// █__ --█ █__ --█ ◄█ - █
@@ -36,28 +36,58 @@ using System.ComponentModel.DataAnnotations;
namespace slskd.Transfers.API;
-public record EnqueueDownloadBatchRequest
+public record QueueDownloadBatchRequest
{
- public Guid? BatchId { get; init; }
+ /// <summary>
+ /// The ID of the Batch.
+ /// </summary>
+ /// <remarks>
+ /// If not supplied, one will be randomly generated.
+ /// </remarks>
+ public Guid? Id { get; init; } = Guid.NewGuid();
+
+ /// <summary>
+ /// The ID of the associated Search, if applicable.
+ /// </summary>
public Guid? SearchId { get; init; }
+ /// <summary>
+ /// The username of the user from which to download.
+ /// </summary>
[Required]
[StringLength(500, MinimumLength = 1)]
public string Username { get; init; }
+
+ /// <summary>
+ /// The list of files to download.
+ /// </summary>
public List<EnqueueDownloadBatchItem> Files { get; init; } = [];
+
+ /// <summary>
+ /// Options for the Batch.
+ /// </summary>
public EnqueueDownloadBatchOptions Options { get; init; } = new();
}
public record EnqueueDownloadBatchItem
{
+ /// <summary>
+ /// The name of the file.
+ /// </summary>
[Required]
public string Filename { get; set; }
+ /// <summary>
+ /// The file size.
+ /// </summary>
[Range(0, int.MaxValue)]
public long Size { get; set; }
}
public record EnqueueDownloadBatchOptions
{
+ /// <summary>
+ /// The destination directory for the files, relative to the configured download directory.
+ /// </summary>
public string Destination { get; init; }
} \ No newline at end of file