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/),
|
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).
|
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
|
### Changed
|
||||||
- Fixed issues with the qBittorrent endpoint.
|
- Fixed issues with the qBittorrent endpoint.
|
||||||
- Fixed issue that could crash the torrent runner.
|
- Fixed issue that could crash the torrent runner.
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<a class="navbar-item" routerLink="profile"> Profile </a>
|
<a class="navbar-item" routerLink="profile"> Profile </a>
|
||||||
<a class="navbar-item" (click)="logout()"> Logout </a>
|
<a class="navbar-item" (click)="logout()"> Logout </a>
|
||||||
<hr class="navbar-divider" />
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "rdt-client",
|
"name": "rdt-client",
|
||||||
"version": "2.0.76",
|
"version": "2.0.77",
|
||||||
"description": "This is a web interface to manage your torrents on Real-Debrid.",
|
"description": "This is a web interface to manage your torrents on Real-Debrid.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ using RdtClient.Service.Services.Downloaders;
|
||||||
|
|
||||||
namespace RdtClient.Service.Services;
|
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;
|
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.Internal => new InternalDownloader(download.Link, filePath),
|
||||||
Data.Enums.DownloadClient.Bezzad => new BezzadDownloader(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),
|
Data.Enums.DownloadClient.Symlink => new SymlinkDownloader(download.Link, filePath, downloadPath),
|
||||||
_ => throw new($"Unknown download client {Type}")
|
_ => throw new($"Unknown download client {Type}")
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ public class Aria2cDownloader : IDownloader
|
||||||
|
|
||||||
private String? _gid;
|
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 = Log.ForContext<Aria2cDownloader>();
|
||||||
_logger.Debug($"Instantiated new Aria2c Downloader for URI {uri} to filePath {filePath} and downloadPath {downloadPath} and GID {gid}");
|
_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))
|
if (!String.IsNullOrWhiteSpace(Settings.Get.DownloadClient.Aria2cDownloadPath))
|
||||||
{
|
{
|
||||||
_remotePath = Path.Combine(Settings.Get.DownloadClient.Aria2cDownloadPath, downloadPath).Replace('\\', '/');
|
_remotePath = Path.Combine(Settings.Get.DownloadClient.Aria2cDownloadPath, downloadPath).Replace('\\', '/');
|
||||||
|
|
||||||
|
if (!String.IsNullOrWhiteSpace(category))
|
||||||
|
{
|
||||||
|
_remotePath = Path.Combine(_remotePath, category);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,7 @@ public class TorrentRunner(ILogger<TorrentRunner> logger, Torrents torrents, Dow
|
||||||
Log($"Setting download path to {downloadPath}", download, torrent);
|
Log($"Setting download path to {downloadPath}", download, torrent);
|
||||||
|
|
||||||
// Start the download process
|
// 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))
|
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();
|
await downloadClient.Start();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
|
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
|
||||||
<Version>2.0.76</Version>
|
<Version>2.0.77</Version>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue