aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-05-24 14:12:41 -0500
committerGitHub <noreply@github.com>2026-05-24 14:12:41 -0500
commit0c25a725360ba67a12ed07eee056256eec408f27 (patch)
tree81b2065fb9334ebf9583b5beae13a5cfde4999bc /src
parent746f7ceefa61e62ad801b825f80b87fe9c853c44 (diff)
parent98b81975d0bf7a10fc834d33d5bfbb6532f75686 (diff)
downloadslskd-0c25a725360ba67a12ed07eee056256eec408f27.tar.gz
Merge pull request #1743 from slskd/destination
Rename retry 'incomplete' setting to 'partial', and default the value to 'resume' (to match docs)
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Core/Options.cs6
-rw-r--r--src/slskd/Transfers/Downloads/DownloadService.cs4
-rw-r--r--src/slskd/Transfers/Types/RetryPartialStrategy.cs (renamed from src/slskd/Transfers/Types/RetryIncompleteStrategy.cs)8
3 files changed, 9 insertions, 9 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs
index 83e534a1..bac86ea2 100644
--- a/src/slskd/Core/Options.cs
+++ b/src/slskd/Core/Options.cs
@@ -1052,10 +1052,10 @@ namespace slskd
public int MaxDelay { get; init; } = 60_000;
/// <summary>
- /// Gets the strategy for handling incomplete files upon retry.
+ /// Gets the strategy for handling partial files upon retry.
/// </summary>
- [Enum(typeof(RetryIncompleteStrategy))]
- public string Incomplete { get; init; } = RetryIncompleteStrategy.Overwrite.ToString().ToLowerInvariant();
+ [Enum(typeof(RetryPartialStrategy))]
+ public string Partial { get; init; } = RetryPartialStrategy.Resume.ToString().ToLowerInvariant();
}
}
diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs
index 83e91ced..013e6a7a 100644
--- a/src/slskd/Transfers/Downloads/DownloadService.cs
+++ b/src/slskd/Transfers/Downloads/DownloadService.cs
@@ -1061,14 +1061,14 @@ namespace slskd.Transfers.Downloads
var completedTransfer = await Retry.Do(() =>
{
var incompleteFileInfo = Files.ResolveFileInfo(incompleteFilename);
- var incompleteStrategy = retryOptions.Incomplete.ToEnum<RetryIncompleteStrategy>();
+ var incompleteStrategy = retryOptions.Partial.ToEnum<RetryPartialStrategy>();
var shouldResume = false;
var startOffset = 0L;
if (incompleteFileInfo.Exists && incompleteFileInfo.Length > 0)
{
- if (incompleteStrategy == RetryIncompleteStrategy.Resume)
+ if (incompleteStrategy == RetryPartialStrategy.Resume)
{
shouldResume = true;
startOffset = incompleteFileInfo.Length;
diff --git a/src/slskd/Transfers/Types/RetryIncompleteStrategy.cs b/src/slskd/Transfers/Types/RetryPartialStrategy.cs
index 9ac8d8e2..20868913 100644
--- a/src/slskd/Transfers/Types/RetryIncompleteStrategy.cs
+++ b/src/slskd/Transfers/Types/RetryPartialStrategy.cs
@@ -1,4 +1,4 @@
-// <copyright file="RetryIncompleteStrategy.cs" company="JP Dillingham">
+// <copyright file="RetryPartialStrategy.cs" company="JP Dillingham">
// ▄▄▄▄ ▄▄▄▄ ▄▄▄▄
// ▄▄▄▄▄▄█ █▄▄▄▄▄█ █▄▄▄▄▄█ █
// █__ --█ █__ --█ ◄█ - █
@@ -33,9 +33,9 @@
namespace slskd.Transfers;
/// <summary>
-/// Strategy for retrying incomplete files.
+/// Strategy for retrying partial files.
/// </summary>
-public enum RetryIncompleteStrategy
+public enum RetryPartialStrategy
{
/// <summary>
/// Overwrite the existing file.
@@ -43,7 +43,7 @@ public enum RetryIncompleteStrategy
Overwrite = 0,
/// <summary>
- /// Resume the transfer using the size of the incomplete file as the initial offset.
+ /// Resume the transfer using the size of the partial file as the initial offset.
/// </summary>
Resume = 1,
} \ No newline at end of file