downloads refactor half done - videos are now implement, but audo files are now

Added downloads manager in the UI where downloads can be viewed/cleared
This commit is contained in:
Isaac Grynsztein
2020-04-20 18:39:55 -04:00
parent d887380fd1
commit 6fe7d20498
13 changed files with 644 additions and 178 deletions

View File

@@ -34,7 +34,9 @@ export interface Download {
percent_complete: number;
downloading: boolean;
is_playlist: boolean;
error: boolean | string;
fileNames?: string[];
complete?: boolean;
}
@Component({
@@ -207,7 +209,8 @@ export class MainComponent implements OnInit {
percent_complete: 0,
url: 'http://youtube.com/watch?v=17848rufj',
downloading: true,
is_playlist: false
is_playlist: false,
error: false
};
simulatedOutput = '';
@@ -571,7 +574,8 @@ export class MainComponent implements OnInit {
percent_complete: 0,
url: this.url,
downloading: true,
is_playlist: this.url.includes('playlist')
is_playlist: this.url.includes('playlist'),
error: false
};
this.downloads.push(new_download);
if (!this.current_download && !this.multiDownloadMode) { this.current_download = new_download };
@@ -613,7 +617,8 @@ export class MainComponent implements OnInit {
percent_complete: 0,
url: this.url,
downloading: true,
is_playlist: this.url.includes('playlist')
is_playlist: this.url.includes('playlist'),
error: false
};
this.downloads.push(new_download);
if (!this.current_download && !this.multiDownloadMode) { this.current_download = new_download };