Fixed torrent runner retry for downloaders.
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
48097f1eb8
commit
a5709ae52e
5 changed files with 26 additions and 23 deletions
|
|
@ -4,6 +4,10 @@ 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.56] - 2024-01-07
|
||||||
|
### Changed
|
||||||
|
- Add retry mechanism for the downloaders.
|
||||||
|
|
||||||
## [2.0.55] - 2024-01-07
|
## [2.0.55] - 2024-01-07
|
||||||
### Changed
|
### Changed
|
||||||
- Tweaked the internal downloader to prevent memory issues.
|
- Tweaked the internal downloader to prevent memory issues.
|
||||||
|
|
|
||||||
|
|
@ -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.55</a>
|
<a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.56</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "rdt-client",
|
"name": "rdt-client",
|
||||||
"version": "2.0.55",
|
"version": "2.0.56",
|
||||||
"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": {
|
||||||
|
|
|
||||||
|
|
@ -347,11 +347,6 @@ public class TorrentRunner
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log($"Marking download as started", download, torrent);
|
|
||||||
|
|
||||||
download.DownloadStarted = DateTime.UtcNow;
|
|
||||||
await _downloads.UpdateDownloadStarted(download.DownloadId, download.DownloadStarted);
|
|
||||||
|
|
||||||
var downloadPath = settingDownloadPath;
|
var downloadPath = settingDownloadPath;
|
||||||
|
|
||||||
if (!String.IsNullOrWhiteSpace(torrent.Category))
|
if (!String.IsNullOrWhiteSpace(torrent.Category))
|
||||||
|
|
@ -364,23 +359,27 @@ public class TorrentRunner
|
||||||
// Start the download process
|
// Start the download process
|
||||||
var downloadClient = new DownloadClient(download, torrent, downloadPath);
|
var downloadClient = new DownloadClient(download, torrent, downloadPath);
|
||||||
|
|
||||||
if (ActiveDownloadClients.TryAdd(download.DownloadId, downloadClient))
|
Log($"Starting download", download, torrent);
|
||||||
|
|
||||||
|
var remoteId = await downloadClient.Start();
|
||||||
|
|
||||||
|
if (String.IsNullOrWhiteSpace(remoteId) || download.RemoteId == remoteId)
|
||||||
{
|
{
|
||||||
Log($"Starting download", download, torrent);
|
Log($"No ID received", download, torrent);
|
||||||
|
continue;
|
||||||
var remoteId = await downloadClient.Start();
|
|
||||||
|
|
||||||
if (!String.IsNullOrWhiteSpace(remoteId) && download.RemoteId != remoteId)
|
|
||||||
{
|
|
||||||
Log($"Received ID {remoteId}", download, torrent);
|
|
||||||
|
|
||||||
await _downloads.UpdateRemoteId(download.DownloadId, remoteId);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Log($"No ID received", download, torrent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log($"Received ID {remoteId}", download, torrent);
|
||||||
|
|
||||||
|
download.RemoteId = remoteId;
|
||||||
|
await _downloads.UpdateRemoteId(download.DownloadId, remoteId);
|
||||||
|
|
||||||
|
Log($"Marking download as started", download, torrent);
|
||||||
|
|
||||||
|
download.DownloadStarted = DateTime.UtcNow;
|
||||||
|
await _downloads.UpdateDownloadStarted(download.DownloadId, download.DownloadStarted);
|
||||||
|
|
||||||
|
ActiveDownloadClients.TryAdd(download.DownloadId, downloadClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if there are any unpacks that are queued and can be started.
|
// Check if there are any unpacks that are queued and can be started.
|
||||||
|
|
|
||||||
|
|
@ -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.55</Version>
|
<Version>2.0.56</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