diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c72e48..17427e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +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.62] - 2024-02-17
+### Changed
+- Fixed reporting a torrent as error when some downloads have failed but still need to be retried.
+- Fixed issue where downloads could get started over and over.
+
## [2.0.61] - 2024-01-21
### Added
- Added setting to include or exclude files based on a given regex.
diff --git a/client/src/app/navbar/navbar.component.html b/client/src/app/navbar/navbar.component.html
index 0446db3..8d0b002 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.61
+ Version 2.0.62
diff --git a/client/src/app/torrent-status.pipe.ts b/client/src/app/torrent-status.pipe.ts
index 0190168..b2c64f6 100644
--- a/client/src/app/torrent-status.pipe.ts
+++ b/client/src/app/torrent-status.pipe.ts
@@ -14,12 +14,6 @@ export class TorrentStatusPipe implements PipeTransform {
}
if (torrent.downloads.length > 0) {
- const errors = torrent.downloads.where((m) => m.error != null);
-
- if (errors.length > 0) {
- return 'Error';
- }
-
const allFinished = torrent.downloads.all((m) => m.completed != null);
if (allFinished) {
@@ -62,7 +56,7 @@ export class TorrentStatusPipe implements PipeTransform {
}
return `Extracting file ${unpacking.length + unpacked.length}/${torrent.downloads.length} (${progress.toFixed(
- 2
+ 2,
)}%)`;
}
diff --git a/package.json b/package.json
index 1da94b7..fc6958a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "rdt-client",
- "version": "2.0.61",
+ "version": "2.0.62",
"description": "This is a web interface to manage your torrents on Real-Debrid.",
"main": "index.js",
"dependencies": {
diff --git a/server/RdtClient.Service/Helpers/Logger.cs b/server/RdtClient.Service/Helpers/Logger.cs
index 7a27860..8b341d4 100644
--- a/server/RdtClient.Service/Helpers/Logger.cs
+++ b/server/RdtClient.Service/Helpers/Logger.cs
@@ -18,7 +18,12 @@ public static class Logger
var done = (Int32)((Double)download.BytesDone / download.BytesTotal * 100);
- return $"for download {fileName}. Completed: {done}%, avg speed: {download.Speed}bytes/s ({download.DownloadId})";
+ if (done < 0)
+ {
+ done = 0;
+ }
+
+ return $"for download {fileName}. Completed: {done}%, avg speed: {download.Speed}bytes/s ({download.DownloadId}) remoteID: {download.RemoteId}";
}
public static String ToLog(this Torrent torrent)
diff --git a/server/RdtClient.Service/Services/QBittorrent.cs b/server/RdtClient.Service/Services/QBittorrent.cs
index 08b29e0..e82bd1f 100644
--- a/server/RdtClient.Service/Services/QBittorrent.cs
+++ b/server/RdtClient.Service/Services/QBittorrent.cs
@@ -290,27 +290,13 @@ public class QBittorrent
Upspeed = speed
};
- if (torrent.Retry != null)
- {
- result.State = "downloading";
- }
- else if (!String.IsNullOrWhiteSpace(torrent.Error))
+ if (!String.IsNullOrWhiteSpace(torrent.Error))
{
result.State = "error";
}
else if (torrent.Completed.HasValue)
{
- var allDownloadsComplete = torrent.Downloads.All(m => m.Completed.HasValue);
- var hasDownloadsWithErrors = torrent.Downloads.Any(m => m.Error != null);
-
- if (torrent.Downloads.Count == 0 || hasDownloadsWithErrors || torrent.RdStatus == TorrentStatus.Error)
- {
- result.State = "error";
- }
- else if (allDownloadsComplete)
- {
- result.State = "pausedUP";
- }
+ result.State = "pausedUP";
}
results.Add(result);
diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs
index fdebee6..5551132 100644
--- a/server/RdtClient.Service/Services/TorrentRunner.cs
+++ b/server/RdtClient.Service/Services/TorrentRunner.cs
@@ -335,6 +335,8 @@ public class TorrentRunner
.OrderBy(m => m.DownloadQueued)
.ToList();
+ Log($"Currently {queuedDownloads.Count} queued downloads and {ActiveDownloadClients.Count} total active downloads", torrent);
+
foreach (var download in queuedDownloads)
{
Log($"Processing to download", download, torrent);
@@ -388,7 +390,7 @@ public class TorrentRunner
var remoteId = await downloadClient.Start();
- if (String.IsNullOrWhiteSpace(remoteId) || download.RemoteId == remoteId)
+ if (String.IsNullOrWhiteSpace(remoteId))
{
Log($"No ID received", download, torrent);
continue;
diff --git a/server/RdtClient.Web/RdtClient.Web.csproj b/server/RdtClient.Web/RdtClient.Web.csproj
index d4e283d..c5ff0d3 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.61
+ 2.0.62
enable
enable
latest