Fixed download path issue with Aria2c when a category is set.
Some checks failed
Docker Image CI / build (push) Has been cancelled
Some checks failed
Docker Image CI / build (push) Has been cancelled
This commit is contained in:
parent
73823233fd
commit
06c034f18a
8 changed files with 18 additions and 9 deletions
|
|
@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.0.76] - 2024-04-24
|
||||
## [2.0.77] - 2024-05-03
|
||||
### Changed
|
||||
- Fixed Aria2c download path issue when a category is set.
|
||||
|
||||
## [2.0.76] - 2024-05-02
|
||||
### Changed
|
||||
- Fixed issues with the qBittorrent endpoint.
|
||||
- Fixed issue that could crash the torrent runner.
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<a class="navbar-item" routerLink="profile"> Profile </a>
|
||||
<a class="navbar-item" (click)="logout()"> Logout </a>
|
||||
<hr class="navbar-divider" />
|
||||
<a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.76</a>
|
||||
<a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.77</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "rdt-client",
|
||||
"version": "2.0.76",
|
||||
"version": "2.0.77",
|
||||
"description": "This is a web interface to manage your torrents on Real-Debrid.",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using RdtClient.Service.Services.Downloaders;
|
|||
|
||||
namespace RdtClient.Service.Services;
|
||||
|
||||
public class DownloadClient(Download download, Torrent torrent, String destinationPath)
|
||||
public class DownloadClient(Download download, Torrent torrent, String destinationPath, String? category)
|
||||
{
|
||||
public IDownloader? Downloader;
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ public class DownloadClient(Download download, Torrent torrent, String destinati
|
|||
{
|
||||
Data.Enums.DownloadClient.Internal => new InternalDownloader(download.Link, filePath),
|
||||
Data.Enums.DownloadClient.Bezzad => new BezzadDownloader(download.Link, filePath),
|
||||
Data.Enums.DownloadClient.Aria2c => new Aria2cDownloader(download.RemoteId, download.Link, filePath, downloadPath),
|
||||
Data.Enums.DownloadClient.Aria2c => new Aria2cDownloader(download.RemoteId, download.Link, filePath, downloadPath, category),
|
||||
Data.Enums.DownloadClient.Symlink => new SymlinkDownloader(download.Link, filePath, downloadPath),
|
||||
_ => throw new($"Unknown download client {Type}")
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class Aria2cDownloader : IDownloader
|
|||
|
||||
private String? _gid;
|
||||
|
||||
public Aria2cDownloader(String? gid, String uri, String filePath, String downloadPath)
|
||||
public Aria2cDownloader(String? gid, String uri, String filePath, String downloadPath, String? category)
|
||||
{
|
||||
_logger = Log.ForContext<Aria2cDownloader>();
|
||||
_logger.Debug($"Instantiated new Aria2c Downloader for URI {uri} to filePath {filePath} and downloadPath {downloadPath} and GID {gid}");
|
||||
|
|
@ -31,6 +31,11 @@ public class Aria2cDownloader : IDownloader
|
|||
if (!String.IsNullOrWhiteSpace(Settings.Get.DownloadClient.Aria2cDownloadPath))
|
||||
{
|
||||
_remotePath = Path.Combine(Settings.Get.DownloadClient.Aria2cDownloadPath, downloadPath).Replace('\\', '/');
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(category))
|
||||
{
|
||||
_remotePath = Path.Combine(_remotePath, category);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ public class TorrentRunner(ILogger<TorrentRunner> logger, Torrents torrents, Dow
|
|||
Log($"Setting download path to {downloadPath}", download, torrent);
|
||||
|
||||
// Start the download process
|
||||
var downloadClient = new DownloadClient(download, torrent, downloadPath);
|
||||
var downloadClient = new DownloadClient(download, torrent, downloadPath, torrent.Category);
|
||||
|
||||
if (ActiveDownloadClients.TryAdd(download.DownloadId, downloadClient))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public class SettingsController(Settings settings, Torrents torrents) : Controll
|
|||
}
|
||||
};
|
||||
|
||||
var downloadClient = new DownloadClient(download, download.Torrent, downloadPath);
|
||||
var downloadClient = new DownloadClient(download, download.Torrent, downloadPath, null);
|
||||
|
||||
await downloadClient.Start();
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<TargetFramework>net8.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
|
||||
<Version>2.0.76</Version>
|
||||
<Version>2.0.77</Version>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>latest</LangVersion>
|
||||
|
|
|
|||
Loading…
Reference in a new issue