From 7575ff895d232971d95a23b1c3cda6e59cb36ff2 Mon Sep 17 00:00:00 2001 From: vkartk <53650724+vkartk@users.noreply.github.com> Date: Fri, 26 Jan 2024 20:13:34 +0530 Subject: [PATCH 1/2] [ Feature ] Add retry button (#327) --- ui/src/app/app.component.html | 1 + ui/src/app/app.component.ts | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html index a47bb15..841b9d2 100644 --- a/ui/src/app/app.component.html +++ b/ui/src/app/app.component.html @@ -152,6 +152,7 @@ + File Size diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index 0590ff4..deb2760 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -35,6 +35,8 @@ export class AppComponent implements AfterViewInit { @ViewChild('doneDelSelected') doneDelSelected: ElementRef; @ViewChild('doneClearCompleted') doneClearCompleted: ElementRef; @ViewChild('doneClearFailed') doneClearFailed: ElementRef; + @ViewChild('doneRetryFailed') doneRetryFailed: ElementRef; + faTrashAlt = faTrashAlt; faCheckCircle = faCheckCircle; @@ -83,6 +85,7 @@ export class AppComponent implements AfterViewInit { }); this.doneClearCompleted.nativeElement.disabled = completed === 0; this.doneClearFailed.nativeElement.disabled = failed === 0; + this.doneRetryFailed.nativeElement.disabled = failed === 0; }); } @@ -221,6 +224,14 @@ export class AppComponent implements AfterViewInit { this.downloads.delByFilter('done', dl => dl.status === 'error').subscribe(); } + retryFailedDownloads() { + this.downloads.done.forEach((dl, key) => { + if (dl.status === 'error') { + this.retryDownload(key, dl); + } + }); + } + buildDownloadLink(download: Download) { let baseDir = 'download/'; if (download.quality == 'audio' || download.filename.endsWith('.mp3')) { From e7cfbb578602aea65a66601cee21339ecd86537f Mon Sep 17 00:00:00 2001 From: vkartk <53650724+vkartk@users.noreply.github.com> Date: Fri, 26 Jan 2024 20:17:28 +0530 Subject: [PATCH 2/2] Fix unclosed th tag in fileSize column --- ui/src/app/app.component.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html index 841b9d2..e5b7145 100644 --- a/ui/src/app/app.component.html +++ b/ui/src/app/app.component.html @@ -180,6 +180,7 @@ {{ download.value.size | fileSize }} +