From b2a725c285b1779f69287c5f5a6454d095cb7bcf Mon Sep 17 00:00:00 2001 From: Antonin Lenfant-Kodia Date: Mon, 15 Jun 2026 15:58:23 +0200 Subject: [PATCH] Simplify comments --- server/RdtClient.Data/Models/Internal/DbSettings.cs | 4 ++-- .../Services/Downloaders/DownloadStationDownloaderTest.cs | 2 +- .../Services/Downloaders/DownloadStationDownloader.cs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/RdtClient.Data/Models/Internal/DbSettings.cs b/server/RdtClient.Data/Models/Internal/DbSettings.cs index 54ef2ee..f5c9548 100644 --- a/server/RdtClient.Data/Models/Internal/DbSettings.cs +++ b/server/RdtClient.Data/Models/Internal/DbSettings.cs @@ -154,7 +154,7 @@ http://127.0.0.1:6800/jsonrpc.")] public String DownloadStationUrl { get; set; } = "http://127.0.0.1:5000"; [DisplayName("Synology DownloadStation Username")] - [Description("The username to use when connecting to the Synology DownloadStation.")] + [Description("The username to use when connecting to the Synology DownloadStation. The account needs Download Station and File Station permissions (so the per-download destination folder can be created).")] public String? DownloadStationUsername { get; set; } = null; [DisplayName("Synology DownloadStation Password")] @@ -162,7 +162,7 @@ http://127.0.0.1:6800/jsonrpc.")] public String? DownloadStationPassword { get; set; } = null; [DisplayName("Synology Download Station Download Path")] - [Description("The root path on the Synology to download to, relative to a shared folder (e.g. \"Media/Downloads/Torrents\"), NOT an absolute path like \"/volume1/Media/...\". If empty, the default Download Station destination is used. The account also needs File Station permission so the per-download destination folder can be created.")] + [Description("The root path to download the file on the Synology DownloadStation host, if empty the default DownloadStation path is used.")] public String? DownloadStationDownloadPath { get; set; } = null; [DisplayName("Minimum free disk space (GB) (Bezzad only)")] diff --git a/server/RdtClient.Service.Test/Services/Downloaders/DownloadStationDownloaderTest.cs b/server/RdtClient.Service.Test/Services/Downloaders/DownloadStationDownloaderTest.cs index 1723166..1684e16 100644 --- a/server/RdtClient.Service.Test/Services/Downloaders/DownloadStationDownloaderTest.cs +++ b/server/RdtClient.Service.Test/Services/Downloaders/DownloadStationDownloaderTest.cs @@ -88,7 +88,7 @@ public class DownloadStationDownloaderTest // Assert: an existing task must be reused (idempotent), not re-created or thrown as "already added". // Throwing would brick every retry that reuses the gid because the DownloadStation delete fails to - // deserialize its response (upstream #792), so the task is never actually removed. + // deserialize its response, so the task is never actually removed. Assert.Equal(mocks.Gid, gid); mocks.TaskEndpointMock.Verify(t => t.GetInfoAsync(mocks.Gid), Times.Once); mocks.TaskEndpointMock.VerifyNoOtherCalls(); diff --git a/server/RdtClient.Service/Services/Downloaders/DownloadStationDownloader.cs b/server/RdtClient.Service/Services/Downloaders/DownloadStationDownloader.cs index 366b508..c5347ab 100644 --- a/server/RdtClient.Service/Services/Downloaders/DownloadStationDownloader.cs +++ b/server/RdtClient.Service/Services/Downloaders/DownloadStationDownloader.cs @@ -116,7 +116,7 @@ public class DownloadStationDownloader : IDownloader } catch (Exception ex) { - // The Synology DELETE response can itself fail to deserialize (upstream #792); don't let cleanup throw. + // The Synology DELETE response can itself fail to deserialize; don't let cleanup throw. _logger.Debug($"Failed to remove DownloadStation task {_gid}: {ex.Message}"); } } @@ -140,8 +140,8 @@ public class DownloadStationDownloader : IDownloader { // A task for this download already exists in DownloadStation; adopt it instead of throwing. // Throwing here permanently bricks every retry that reuses the gid: the caller Cancel()s first, - // but the DownloadStation delete response fails to deserialize (upstream #792) so the task is not - // actually removed, and the next Download() then errors with "already added" forever. + // but the DownloadStation delete response fails to deserialize so the task is not actually + // removed, and the next Download() then errors with "already added" forever. _logger.Debug($"Download with ID {_gid} already exists in DownloadStation; reusing it"); return _gid; @@ -389,7 +389,7 @@ public class DownloadStationDownloader : IDownloader } catch (Exception ex) { - // The task-list response can fail to deserialize when a task carries a non-string error_detail (upstream #723); + // The task-list response can fail to deserialize when a task carries a non-string error_detail; // treat that as "not found" instead of aborting the whole download. _logger.Debug($"Failed to list DownloadStation tasks for {_uri}: {ex.Message}");