Skip to content

Commit

Permalink
update verbiage for "force retry"
Browse files Browse the repository at this point in the history
  • Loading branch information
lardbit committed Sep 6, 2021
1 parent 959e313 commit 54688b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@
<span *ngIf="result.torrent">{{ result.torrent.format_eta }}</span>
</td>
<td>
<button *ngIf="result.torrent" class="btn btn-warning btn-sm" (click)="blacklistRetry(result.watchMedia)" placement="top" ngbTooltip="Blacklist torrent and retry"><span class="oi oi-ban"></span></button>
<button *ngIf="!result.torrent" class="btn btn-danger btn-sm" (click)="blacklistRetry(result.watchMedia)" placement="top" [ngbTooltip]="result.watchMedia.collected ? 'Retry downloading another torrent' : 'Force retry now'"><span class="oi oi-loop-circular"></span></button>
<button *ngIf="result.torrent" class="btn btn-warning btn-sm" (click)="blacklistRetry(result.watchMedia, true)" placement="top" ngbTooltip="Blacklist torrent and retry"><span class="oi oi-ban"></span></button>
<button *ngIf="!result.torrent && result.watchMedia.collected" class="btn btn-danger btn-sm" (click)="blacklistRetry(result.watchMedia)" placement="top" ngbTooltip="Retry downloading another torrent"><span class="oi oi-loop-circular"></span></button>
<button *ngIf="!result.torrent && !result.watchMedia.collected" class="btn btn-info btn-sm" (click)="blacklistRetry(result.watchMedia)" placement="top" ngbTooltip="Force retry now"><span class="oi oi-action-redo"></span></button>
</td>
</ng-container>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export class TorrentDetailsComponent implements OnInit, OnDestroy {
);
}

public blacklistRetry(watchMedia) {
public blacklistRetry(watchMedia, blacklist?: boolean) {
const message = blacklist ? 'Blacklisting torrent and retrying' : 'Retrying download now';
this.isSaving = true;

let endpoint;
Expand All @@ -86,7 +87,7 @@ export class TorrentDetailsComponent implements OnInit, OnDestroy {
endpoint.subscribe(
(data) => {
this.isSaving = false;
this.toastr.success('Retrying different torrent');
this.toastr.success(message);
},
(error) => {
console.error(error);
Expand Down

0 comments on commit 54688b1

Please sign in to comment.