diff --git a/CHANGELOG.md b/CHANGELOG.md index 984b93f..b6da2bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased +## [2.0.137] - 2026-06-05 +### Fixed +- Fix torbox save path mapping for single file downloads. + ## [2.0.136] - 2026-05-30 ### Added - Added devcontainer development workflow. diff --git a/server/RdtClient.Service/Services/QBittorrent.cs b/server/RdtClient.Service/Services/QBittorrent.cs index 4e022ac..2a82267 100644 --- a/server/RdtClient.Service/Services/QBittorrent.cs +++ b/server/RdtClient.Service/Services/QBittorrent.cs @@ -359,6 +359,11 @@ public class QBittorrent(ILogger logger, ISettings settings, Authen var selectedFileName = topLevelSelectedFiles[0]!; var selectedFileBaseName = Path.GetFileNameWithoutExtension(selectedFileName); + if (torrent.ClientKind == Provider.TorBox) + { + return selectedFileBaseName; + } + if (!String.IsNullOrWhiteSpace(selectedFileBaseName) && selectedFileBaseName.Equals(torrent.RdName, StringComparison.OrdinalIgnoreCase)) { diff --git a/server/RdtClient.Service/Services/Settings.cs b/server/RdtClient.Service/Services/Settings.cs index b471192..987a44e 100644 --- a/server/RdtClient.Service/Services/Settings.cs +++ b/server/RdtClient.Service/Services/Settings.cs @@ -41,6 +41,11 @@ public class Settings(IServiceScopeFactory serviceScopeFactory) : ISettings { var downloadPath = settings.DownloadClient.MappedPath; + if (String.IsNullOrWhiteSpace(downloadPath)) + { + downloadPath = settings.DownloadClient.DownloadPath; + } + downloadPath = downloadPath.TrimEnd('\\') .TrimEnd('/');