From 262e29678312a10553bf676164fa84432cdb3f3b Mon Sep 17 00:00:00 2001 From: James Lyne Date: Sun, 13 Aug 2023 12:24:19 +0100 Subject: [PATCH] Fix retry button issues The arguments passed to retryDownload by the retry button do not match what the function actually expects. This causes downloads to break if a custom folder is set and also causes some settings like format and custom name prefix to be ignored. --- ui/src/app/app.component.html | 2 +- ui/src/app/app.component.ts | 8 ++++---- ui/src/app/downloads.service.ts | 10 ++++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html index e23df39..a9a604b 100644 --- a/ui/src/app/app.component.html +++ b/ui/src/app/app.component.html @@ -140,7 +140,7 @@ {{ download.value.title }} - + diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index 7c7dee0..1824052 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -37,8 +37,8 @@ export class AppComponent implements AfterViewInit { faTimesCircle = faTimesCircle; faRedoAlt = faRedoAlt; faSun = faSun; - faMoon = faMoon; - faDownload = faDownload; + faMoon = faMoon; + faDownload = faDownload; faExternalLinkAlt = faExternalLinkAlt; constructor(public downloads: DownloadsService, private cookieService: CookieService) { @@ -174,8 +174,8 @@ export class AppComponent implements AfterViewInit { }); } - retryDownload(key: string, url: string, quality: string, format: string, folder: string, customNamePrefix: string) { - this.addDownload(url, quality, format, folder, customNamePrefix); + retryDownload(key: string, download: Download) { + this.addDownload(download.url, download.quality, download.format, download.folder, download.custom_name_prefix); this.downloads.delById('done', [key]).subscribe(); } diff --git a/ui/src/app/downloads.service.ts b/ui/src/app/downloads.service.ts index b4a6108..eb5af81 100644 --- a/ui/src/app/downloads.service.ts +++ b/ui/src/app/downloads.service.ts @@ -12,15 +12,17 @@ export interface Status { export interface Download { id: string; title: string; - url: string, + url: string; + quality: string; + format: string; + folder: string; + custom_name_prefix: string; status: string; msg: string; - filename: string; - folder: string; - quality: string; percent: number; speed: number; eta: number; + filename: string; checked?: boolean; deleting?: boolean; }