From 05e565ff1f47995ab4c17bdc29a37c762053307e Mon Sep 17 00:00:00 2001 From: Roger Far Date: Sat, 31 Jul 2021 14:50:59 -0600 Subject: [PATCH] Fixed bug where the download and unpack handlers were not properly dispatched. --- client/src/app/download-status.pipe.ts | 2 +- client/src/app/torrent/torrent.component.html | 4 ++++ server/RdtClient.Service/Services/DownloadClient.cs | 2 +- server/RdtClient.Service/Services/TorrentRunner.cs | 2 ++ server/RdtClient.Service/Services/UnpackClient.cs | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/src/app/download-status.pipe.ts b/client/src/app/download-status.pipe.ts index a77aab4..daf6c87 100644 --- a/client/src/app/download-status.pipe.ts +++ b/client/src/app/download-status.pipe.ts @@ -14,7 +14,7 @@ export class DownloadStatusPipe implements PipeTransform { } if (value.error) { - return `Error`; + return value.error; } if (value.completed != null) { diff --git a/client/src/app/torrent/torrent.component.html b/client/src/app/torrent/torrent.component.html index 9b59205..41a4cf9 100644 --- a/client/src/app/torrent/torrent.component.html +++ b/client/src/app/torrent/torrent.component.html @@ -199,6 +199,10 @@ {{ download.link | decodeURI }} + + + {{ download.path }} + {{ download.bytesTotal | filesize }} diff --git a/server/RdtClient.Service/Services/DownloadClient.cs b/server/RdtClient.Service/Services/DownloadClient.cs index 350de64..383ef85 100644 --- a/server/RdtClient.Service/Services/DownloadClient.cs +++ b/server/RdtClient.Service/Services/DownloadClient.cs @@ -56,7 +56,7 @@ namespace RdtClient.Service.Services var uri = new Uri(_download.Link); - await Task.Run(async delegate + Task.Run(async delegate { switch (settings.DownloadClient) { diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs index 376e26a..5fb1c25 100644 --- a/server/RdtClient.Service/Services/TorrentRunner.cs +++ b/server/RdtClient.Service/Services/TorrentRunner.cs @@ -225,6 +225,8 @@ namespace RdtClient.Service.Services await _downloads.UpdateCompleted(download.DownloadId, DateTimeOffset.UtcNow); download.Error = ex.Message; download.Completed = DateTimeOffset.UtcNow; + + Log.Information($"Cannot unrestrict: {ex.Message}"); continue; } diff --git a/server/RdtClient.Service/Services/UnpackClient.cs b/server/RdtClient.Service/Services/UnpackClient.cs index 5a2e22a..31ca0dc 100644 --- a/server/RdtClient.Service/Services/UnpackClient.cs +++ b/server/RdtClient.Service/Services/UnpackClient.cs @@ -50,7 +50,7 @@ namespace RdtClient.Service.Services throw new Exception("Invalid download path"); } - await Task.Run(async delegate + Task.Run(async delegate { if (!_cancelled) {