aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Transfers/Types
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-05-03 18:44:16 -0500
committerJP Dillingham <jp@dillingham.me>2026-05-03 18:44:16 -0500
commitd45e33185daf1e0320ce60e3c324dbf3efae49ef (patch)
tree9df5b3ac64d212d6987a8aa50ef8a371ed478df5 /src/slskd/Transfers/Types
parent08380a1a150f58839798ca3289aa8b5542f41086 (diff)
downloadslskd-d45e33185daf1e0320ce60e3c324dbf3efae49ef.tar.gz
rough in options json support
Diffstat (limited to 'src/slskd/Transfers/Types')
-rw-r--r--src/slskd/Transfers/Types/Batch.cs8
-rw-r--r--src/slskd/Transfers/Types/BatchOptions.cs48
2 files changed, 50 insertions, 6 deletions
diff --git a/src/slskd/Transfers/Types/Batch.cs b/src/slskd/Transfers/Types/Batch.cs
index 3da583f3..d4234e30 100644
--- a/src/slskd/Transfers/Types/Batch.cs
+++ b/src/slskd/Transfers/Types/Batch.cs
@@ -91,13 +91,9 @@ public record Batch
public ICollection<Transfer> Transfers { get; init; } = null;
/// <summary>
- /// Gets the optional destination directory for the files in the Batch, relative to the configured
- /// download directory.
+ /// Gets the options for the batch.
/// </summary>
- /// <remarks>
- /// If specified, takes precedence over other configured placement rules.
- /// </remarks>
- public string DestinationDirectory { get; init; }
+ public BatchOptions Options { get; init; }
/*
future: [NotMapped] properties that aggregate values from the associated Transfer records.
diff --git a/src/slskd/Transfers/Types/BatchOptions.cs b/src/slskd/Transfers/Types/BatchOptions.cs
new file mode 100644
index 00000000..6bacef8c
--- /dev/null
+++ b/src/slskd/Transfers/Types/BatchOptions.cs
@@ -0,0 +1,48 @@
+// <copyright file="BatchOptions.cs" company="JP Dillingham">
+// ▄▄▄▄ ▄▄▄▄ ▄▄▄▄
+// ▄▄▄▄▄▄█ █▄▄▄▄▄█ █▄▄▄▄▄█ █
+// █__ --█ █__ --█ ◄█ - █
+// █▄▄▄▄▄█▄▄█▄▄▄▄▄█▄▄█▄▄█▄▄▄▄▄█
+// ┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━ ━ ━┉ ┉ ┉
+// │ Copyright (c) JP Dillingham.
+// │
+// │ This program is free software: you can redistribute it and/or modify
+// │ it under the terms of the GNU Affero General Public License as published
+// │ by the Free Software Foundation, version 3.
+// │
+// │ This program is distributed in the hope that it will be useful,
+// │ but WITHOUT ANY WARRANTY; without even the implied warranty of
+// │ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// │ GNU Affero General Public License for more details.
+// │
+// │ You should have received a copy of the GNU Affero General Public License
+// │ along with this program. If not, see https://www.gnu.org/licenses/.
+// │
+// │ This program is distributed with Additional Terms pursuant to Section 7
+// │ of the AGPLv3. See the LICENSE file in the root directory of this
+// │ project for the complete terms and conditions.
+// │
+// │ https://slskd.org
+// │
+// ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ╌ ╌╌╌╌ ╌
+// │ SPDX-FileCopyrightText: JP Dillingham
+// │ SPDX-License-Identifier: AGPL-3.0-only
+// ╰───────────────────────────────────────────╶──── ─ ─── ─ ── ──┈ ┈
+// </copyright>
+
+namespace slskd.Transfers;
+
+/// <summary>
+/// Options for <see cref="Batch"/>es.
+/// </summary>
+public record BatchOptions
+{
+ /// <summary>
+ /// Gets the optional destination directory for the files in the Batch, relative to the configured
+ /// download directory.
+ /// </summary>
+ /// <remarks>
+ /// If specified, takes precedence over other configured placement rules.
+ /// </remarks>
+ public string Destination { get; init; }
+} \ No newline at end of file