commit
4b708e76b4
|
|
@ -140,7 +140,7 @@
|
||||||
<ng-template #noDownloadLink>{{ download.value.title }}</ng-template>
|
<ng-template #noDownloadLink>{{ download.value.title }}</ng-template>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button *ngIf="download.value.status == 'error'" type="button" class="btn btn-link" (click)="retryDownload(download.key, download.value.url, download.value.quality, download.value.folder)"><fa-icon [icon]="faRedoAlt"></fa-icon></button>
|
<button *ngIf="download.value.status == 'error'" type="button" class="btn btn-link" (click)="retryDownload(download.key, download.value)"><fa-icon [icon]="faRedoAlt"></fa-icon></button>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a *ngIf="!!download.value.filename; else noDownloadLink" href="{{buildDownloadLink(download.value)}}" download><fa-icon [icon]="faDownload"></fa-icon></a>
|
<a *ngIf="!!download.value.filename; else noDownloadLink" href="{{buildDownloadLink(download.value)}}" download><fa-icon [icon]="faDownload"></fa-icon></a>
|
||||||
|
|
|
||||||
|
|
@ -174,8 +174,8 @@ export class AppComponent implements AfterViewInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
retryDownload(key: string, url: string, quality: string, format: string, folder: string, customNamePrefix: string) {
|
retryDownload(key: string, download: Download) {
|
||||||
this.addDownload(url, quality, format, folder, customNamePrefix);
|
this.addDownload(download.url, download.quality, download.format, download.folder, download.custom_name_prefix);
|
||||||
this.downloads.delById('done', [key]).subscribe();
|
this.downloads.delById('done', [key]).subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,17 @@ export interface Status {
|
||||||
export interface Download {
|
export interface Download {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
url: string,
|
url: string;
|
||||||
|
quality: string;
|
||||||
|
format: string;
|
||||||
|
folder: string;
|
||||||
|
custom_name_prefix: string;
|
||||||
status: string;
|
status: string;
|
||||||
msg: string;
|
msg: string;
|
||||||
filename: string;
|
|
||||||
folder: string;
|
|
||||||
quality: string;
|
|
||||||
percent: number;
|
percent: number;
|
||||||
speed: number;
|
speed: number;
|
||||||
eta: number;
|
eta: number;
|
||||||
|
filename: string;
|
||||||
checked?: boolean;
|
checked?: boolean;
|
||||||
deleting?: boolean;
|
deleting?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue