Fixed issue where a lot of downloads could be tried in 1 go, causing a bit of a DOS to real-debrid, fixed the status of the torrent as error incorrectly when some downloads are errored out.
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
f96ef294a7
commit
4fb0a8d726
8 changed files with 20 additions and 28 deletions
|
|
@ -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/),
|
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.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
|
## [2.0.61] - 2024-01-21
|
||||||
### Added
|
### Added
|
||||||
- Added setting to include or exclude files based on a given regex.
|
- Added setting to include or exclude files based on a given regex.
|
||||||
|
|
|
||||||
|
|
@ -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.61</a>
|
<a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.62</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,6 @@ export class TorrentStatusPipe implements PipeTransform {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (torrent.downloads.length > 0) {
|
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);
|
const allFinished = torrent.downloads.all((m) => m.completed != null);
|
||||||
|
|
||||||
if (allFinished) {
|
if (allFinished) {
|
||||||
|
|
@ -62,7 +56,7 @@ export class TorrentStatusPipe implements PipeTransform {
|
||||||
}
|
}
|
||||||
|
|
||||||
return `Extracting file ${unpacking.length + unpacked.length}/${torrent.downloads.length} (${progress.toFixed(
|
return `Extracting file ${unpacking.length + unpacked.length}/${torrent.downloads.length} (${progress.toFixed(
|
||||||
2
|
2,
|
||||||
)}%)`;
|
)}%)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "rdt-client",
|
"name": "rdt-client",
|
||||||
"version": "2.0.61",
|
"version": "2.0.62",
|
||||||
"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": {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,12 @@ public static class Logger
|
||||||
|
|
||||||
var done = (Int32)((Double)download.BytesDone / download.BytesTotal * 100);
|
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)
|
public static String ToLog(this Torrent torrent)
|
||||||
|
|
|
||||||
|
|
@ -290,27 +290,13 @@ public class QBittorrent
|
||||||
Upspeed = speed
|
Upspeed = speed
|
||||||
};
|
};
|
||||||
|
|
||||||
if (torrent.Retry != null)
|
if (!String.IsNullOrWhiteSpace(torrent.Error))
|
||||||
{
|
|
||||||
result.State = "downloading";
|
|
||||||
}
|
|
||||||
else if (!String.IsNullOrWhiteSpace(torrent.Error))
|
|
||||||
{
|
{
|
||||||
result.State = "error";
|
result.State = "error";
|
||||||
}
|
}
|
||||||
else if (torrent.Completed.HasValue)
|
else if (torrent.Completed.HasValue)
|
||||||
{
|
{
|
||||||
var allDownloadsComplete = torrent.Downloads.All(m => m.Completed.HasValue);
|
result.State = "pausedUP";
|
||||||
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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
results.Add(result);
|
results.Add(result);
|
||||||
|
|
|
||||||
|
|
@ -335,6 +335,8 @@ public class TorrentRunner
|
||||||
.OrderBy(m => m.DownloadQueued)
|
.OrderBy(m => m.DownloadQueued)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
Log($"Currently {queuedDownloads.Count} queued downloads and {ActiveDownloadClients.Count} total active downloads", torrent);
|
||||||
|
|
||||||
foreach (var download in queuedDownloads)
|
foreach (var download in queuedDownloads)
|
||||||
{
|
{
|
||||||
Log($"Processing to download", download, torrent);
|
Log($"Processing to download", download, torrent);
|
||||||
|
|
@ -388,7 +390,7 @@ public class TorrentRunner
|
||||||
|
|
||||||
var remoteId = await downloadClient.Start();
|
var remoteId = await downloadClient.Start();
|
||||||
|
|
||||||
if (String.IsNullOrWhiteSpace(remoteId) || download.RemoteId == remoteId)
|
if (String.IsNullOrWhiteSpace(remoteId))
|
||||||
{
|
{
|
||||||
Log($"No ID received", download, torrent);
|
Log($"No ID received", download, torrent);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -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.61</Version>
|
<Version>2.0.62</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