Skip to content

Commit

Permalink
Fixed bug where the download and unpack handlers were not properly di…
Browse files Browse the repository at this point in the history
…spatched.
  • Loading branch information
rogerfar committed Jul 31, 2021
1 parent a121593 commit 05e565f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/app/download-status.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class DownloadStatusPipe implements PipeTransform {
}

if (value.error) {
return `Error`;
return value.error;
}

if (value.completed != null) {
Expand Down
4 changes: 4 additions & 0 deletions client/src/app/torrent/torrent.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@
<ng-container *ngIf="download.link">
{{ download.link | decodeURI }}
</ng-container>

<ng-container *ngIf="!download.link">
{{ download.path }}
</ng-container>
</td>
<td>
{{ download.bytesTotal | filesize }}
Expand Down
2 changes: 1 addition & 1 deletion server/RdtClient.Service/Services/DownloadClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public async Task Start(DbSettings settings)

var uri = new Uri(_download.Link);

await Task.Run(async delegate
Task.Run(async delegate
{
switch (settings.DownloadClient)
{
Expand Down
2 changes: 2 additions & 0 deletions server/RdtClient.Service/Services/TorrentRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ public async Task Tick()
await _downloads.UpdateCompleted(download.DownloadId, DateTimeOffset.UtcNow);
download.Error = ex.Message;
download.Completed = DateTimeOffset.UtcNow;

Log.Information($"Cannot unrestrict: {ex.Message}");
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion server/RdtClient.Service/Services/UnpackClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task Start()
throw new Exception("Invalid download path");
}

await Task.Run(async delegate
Task.Run(async delegate
{
if (!_cancelled)
{
Expand Down

0 comments on commit 05e565f

Please sign in to comment.