From 6f1ec6581a29442c517a368532c9640c7f9dfc42 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 24 Apr 2026 03:58:07 +0000 Subject: [PATCH] fix: default SanitizeFilenames to true only on Linux The underlying bug (debrid-provider filenames with brackets causing downloads to fail) only reproduces on Linux hosts. Windows, macOS, and other platforms handle these characters without issue and have no reason to have their filenames modified. Default the toggle to OperatingSystem.IsLinux() so Windows users see no behaviour change while Linux containers still get the fix out of the box. Users on either platform can override via the setting. Addresses review feedback on PR #962. --- server/RdtClient.Data/Models/Internal/DbSettings.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/RdtClient.Data/Models/Internal/DbSettings.cs b/server/RdtClient.Data/Models/Internal/DbSettings.cs index 6df3281..f5707b4 100644 --- a/server/RdtClient.Data/Models/Internal/DbSettings.cs +++ b/server/RdtClient.Data/Models/Internal/DbSettings.cs @@ -178,8 +178,8 @@ http://127.0.0.1:6800/jsonrpc.")] public DownloadClientLogLevel LogLevel { get; set; } = DownloadClientLogLevel.None; [DisplayName("Sanitize filenames")] - [Description("Strip characters from filenames and torrent directory names that cause issues on Linux containers (square brackets, curly braces, control characters) and collapse multiple consecutive spaces. Recommended on; disable only if you need to preserve the exact filenames from the debrid provider.")] - public Boolean SanitizeFilenames { get; set; } = true; + [Description("Strip characters from filenames and torrent directory names that cause issues on Linux containers (square brackets, curly braces, control characters) and collapse multiple consecutive spaces. Defaults to on for Linux hosts and off elsewhere, since the issue only reproduces on Linux; toggle to override.")] + public Boolean SanitizeFilenames { get; set; } = OperatingSystem.IsLinux(); } public class DbSettingsProvider