Fixed issue where errored downloads would result in an infinite loop of error messages in the home page

Added dialog to view error from an errored out download
This commit is contained in:
Isaac Abadi
2021-09-13 23:19:59 -06:00
parent 3241d6aaaf
commit dbefb66021
6 changed files with 53 additions and 18 deletions

View File

@@ -915,11 +915,15 @@ export class MainComponent implements OnInit {
this.current_download = res['download'];
this.percentDownloaded = this.current_download.percent_complete;
if (this.current_download['finished']) {
if (this.current_download['finished'] && !this.current_download['error']) {
const container = this.current_download['container'];
const is_playlist = this.current_download['file_uids'].length > 1;
this.downloadHelper(container, this.current_download['type'], is_playlist, false);
this.current_download = null;
} else if (this.current_download['finished'] && this.current_download['error']) {
this.downloadingfile = false;
this.current_download = null;
this.openSnackBar('Download failed!', 'OK.');
}
} else {
// console.log('failed to get new download');