From d7b22ab43396c9adf02e4fc8b33e7df7e2f85f01 Mon Sep 17 00:00:00 2001 From: Roger Far Date: Sun, 6 Feb 2022 16:25:13 -0700 Subject: [PATCH] no message --- client/src/app/add-new-torrent/add-new-torrent.component.ts | 1 + server/RdtClient.Service/Services/TorrentRunner.cs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/app/add-new-torrent/add-new-torrent.component.ts b/client/src/app/add-new-torrent/add-new-torrent.component.ts index 7050b12..08d6193 100644 --- a/client/src/app/add-new-torrent/add-new-torrent.component.ts +++ b/client/src/app/add-new-torrent/add-new-torrent.component.ts @@ -117,6 +117,7 @@ export class AddNewTorrentComponent implements OnInit { torrent.torrentRetryAttempts = this.torrentRetryAttempts; torrent.downloadRetryAttempts = this.downloadRetryAttempts; torrent.deleteOnError = this.torrentDeleteOnError; + torrent.lifetime = this.torrentLifetime; if (this.magnetLink) { this.torrentService.uploadMagnet(this.magnetLink, torrent).subscribe( diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs index 5143746..535a689 100644 --- a/server/RdtClient.Service/Services/TorrentRunner.cs +++ b/server/RdtClient.Service/Services/TorrentRunner.cs @@ -294,10 +294,12 @@ namespace RdtClient.Service.Services Log($"Torrent has reached its {torrent.Lifetime} minutes lifetime, marking as error", torrent); - await _torrents.UpdateRetry(torrent.TorrentId, null, 99); - await _torrents.UpdateError(torrent.TorrentId, "Torrent expired in RealDebrid Client"); + await _torrents.UpdateRetry(torrent.TorrentId, null, torrent.TorrentRetryAttempts); + await _torrents.UpdateComplete(torrent.TorrentId, $"Torrent lifetime of {torrent.Lifetime} minutes reached", DateTimeOffset.UtcNow, false); } + torrents = await _torrents.Get(); + torrents = torrents.Where(m => m.Completed == null).ToList(); // Only poll Real-Debrid every second when a hub is connected, otherwise every 30 seconds