Fix torbox save path mapping for single file downloads.
Some checks failed
Release Docker Image / build (map[arch:amd64 platform:linux/amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
Release Docker Image / build (map[arch:arm64 platform:linux/arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Create GitHub Release / Test, Build, and Bundle (push) Has been cancelled
dotnet test / build (push) Has been cancelled
Release Docker Image / push-images (push) Has been cancelled
Create GitHub Release / Create GitHub release (push) Has been cancelled
Some checks failed
Release Docker Image / build (map[arch:amd64 platform:linux/amd64 runs-on:ubuntu-latest]) (push) Has been cancelled
Release Docker Image / build (map[arch:arm64 platform:linux/arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Create GitHub Release / Test, Build, and Bundle (push) Has been cancelled
dotnet test / build (push) Has been cancelled
Release Docker Image / push-images (push) Has been cancelled
Create GitHub Release / Create GitHub release (push) Has been cancelled
This commit is contained in:
parent
5c8a078927
commit
e8a86cf806
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