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