diff --git a/CHANGELOG.md b/CHANGELOG.md
index dbda7cc..10d23d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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.
diff --git a/client/src/app/navbar/navbar.component.html b/client/src/app/navbar/navbar.component.html
index f8deb91..efe1870 100644
--- a/client/src/app/navbar/navbar.component.html
+++ b/client/src/app/navbar/navbar.component.html
@@ -55,7 +55,7 @@
Profile
Logout
- Version 2.0.76
+ Version 2.0.77
diff --git a/package.json b/package.json
index ee97ab4..e697ac2 100644
--- a/package.json
+++ b/package.json
@@ -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": {
diff --git a/server/RdtClient.Service/Services/DownloadClient.cs b/server/RdtClient.Service/Services/DownloadClient.cs
index ff94b13..b8a268d 100644
--- a/server/RdtClient.Service/Services/DownloadClient.cs
+++ b/server/RdtClient.Service/Services/DownloadClient.cs
@@ -4,7 +4,7 @@
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 async Task Start()
{
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}")
};
diff --git a/server/RdtClient.Service/Services/Downloaders/Aria2cDownloader.cs b/server/RdtClient.Service/Services/Downloaders/Aria2cDownloader.cs
index c6e078a..cee39b9 100644
--- a/server/RdtClient.Service/Services/Downloaders/Aria2cDownloader.cs
+++ b/server/RdtClient.Service/Services/Downloaders/Aria2cDownloader.cs
@@ -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();
_logger.Debug($"Instantiated new Aria2c Downloader for URI {uri} to filePath {filePath} and downloadPath {downloadPath} and GID {gid}");
@@ -31,6 +31,11 @@ public Aria2cDownloader(String? gid, String uri, String filePath, String downloa
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
{
diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs
index 07fc8ca..6b55c83 100644
--- a/server/RdtClient.Service/Services/TorrentRunner.cs
+++ b/server/RdtClient.Service/Services/TorrentRunner.cs
@@ -378,7 +378,7 @@ public async Task Tick()
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))
{
diff --git a/server/RdtClient.Web/Controllers/SettingsController.cs b/server/RdtClient.Web/Controllers/SettingsController.cs
index 0bbebf8..bd7f0e6 100644
--- a/server/RdtClient.Web/Controllers/SettingsController.cs
+++ b/server/RdtClient.Web/Controllers/SettingsController.cs
@@ -95,7 +95,7 @@ public async Task TestDownloadSpeed(CancellationToken cancellation
}
};
- var downloadClient = new DownloadClient(download, download.Torrent, downloadPath);
+ var downloadClient = new DownloadClient(download, download.Torrent, downloadPath, null);
await downloadClient.Start();
diff --git a/server/RdtClient.Web/RdtClient.Web.csproj b/server/RdtClient.Web/RdtClient.Web.csproj
index b08d1ce..9d16272 100644
--- a/server/RdtClient.Web/RdtClient.Web.csproj
+++ b/server/RdtClient.Web/RdtClient.Web.csproj
@@ -4,7 +4,7 @@
net8.0
Exe
94c24cba-f03f-4453-a671-3640b517c573
- 2.0.76
+ 2.0.77
enable
enable
latest