Fix torbox save path mapping for single file downloads.
This commit is contained in:
parent
5c8a078927
commit
bda225f3d9
3 changed files with 14 additions and 0 deletions
|
|
@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased
|
## [Unreleased
|
||||||
|
|
||||||
|
## [2.0.137] - 2026-06-05
|
||||||
|
### Fixed
|
||||||
|
- Fix torbox save path mapping for single file downloads.
|
||||||
|
|
||||||
## [2.0.136] - 2026-05-30
|
## [2.0.136] - 2026-05-30
|
||||||
### Added
|
### Added
|
||||||
- Added devcontainer development workflow.
|
- Added devcontainer development workflow.
|
||||||
|
|
|
||||||
|
|
@ -359,6 +359,11 @@ public class QBittorrent(ILogger<QBittorrent> logger, ISettings settings, Authen
|
||||||
var selectedFileName = topLevelSelectedFiles[0]!;
|
var selectedFileName = topLevelSelectedFiles[0]!;
|
||||||
var selectedFileBaseName = Path.GetFileNameWithoutExtension(selectedFileName);
|
var selectedFileBaseName = Path.GetFileNameWithoutExtension(selectedFileName);
|
||||||
|
|
||||||
|
if (torrent.ClientKind == Provider.TorBox)
|
||||||
|
{
|
||||||
|
return selectedFileBaseName;
|
||||||
|
}
|
||||||
|
|
||||||
if (!String.IsNullOrWhiteSpace(selectedFileBaseName) &&
|
if (!String.IsNullOrWhiteSpace(selectedFileBaseName) &&
|
||||||
selectedFileBaseName.Equals(torrent.RdName, StringComparison.OrdinalIgnoreCase))
|
selectedFileBaseName.Equals(torrent.RdName, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,11 @@ public class Settings(IServiceScopeFactory serviceScopeFactory) : ISettings
|
||||||
{
|
{
|
||||||
var downloadPath = settings.DownloadClient.MappedPath;
|
var downloadPath = settings.DownloadClient.MappedPath;
|
||||||
|
|
||||||
|
if (String.IsNullOrWhiteSpace(downloadPath))
|
||||||
|
{
|
||||||
|
downloadPath = settings.DownloadClient.DownloadPath;
|
||||||
|
}
|
||||||
|
|
||||||
downloadPath = downloadPath.TrimEnd('\\')
|
downloadPath = downloadPath.TrimEnd('\\')
|
||||||
.TrimEnd('/');
|
.TrimEnd('/');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue