From 63e44d02efa88133ce43a3e1b4e75e50aa778a18 Mon Sep 17 00:00:00 2001 From: Roger Far Date: Thu, 14 Jan 2021 16:01:05 -0700 Subject: [PATCH] Fixed bug where it would redownload file that was already downloaded. --- server/RdtClient.Service/Services/TorrentRunner.cs | 2 +- server/RdtClient.Service/Services/Torrents.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs index 07b901b..d4e4d2b 100644 --- a/server/RdtClient.Service/Services/TorrentRunner.cs +++ b/server/RdtClient.Service/Services/TorrentRunner.cs @@ -237,7 +237,7 @@ namespace RdtClient.Service.Services // Check if torrent is complete if (torrent.Downloads.Count > 0) { - var allComplete = torrent.Downloads.All(m => m.UnpackingFinished != null); + var allComplete = torrent.Downloads.All(m => m.Completed != null); if (allComplete) { diff --git a/server/RdtClient.Service/Services/Torrents.cs b/server/RdtClient.Service/Services/Torrents.cs index 30eff12..ca9c4e2 100644 --- a/server/RdtClient.Service/Services/Torrents.cs +++ b/server/RdtClient.Service/Services/Torrents.cs @@ -228,7 +228,7 @@ namespace RdtClient.Service.Services var downloadPath = await DownloadPath(download.Torrent); download.DownloadFinished = null; - await _downloads.UpdateDownloadStarted(download.DownloadId, null); + await _downloads.UpdateDownloadFinished(download.DownloadId, null); download.Completed = null; await _downloads.UpdateCompleted(download.DownloadId, null);