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.
This commit is contained in:
James Lyne
2023-08-13 12:24:19 +01:00
parent 8950665f06
commit 262e296783
3 changed files with 11 additions and 9 deletions

View File

@@ -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();
}