mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-20 20:33:19 +03:00
Final fix for bug where failed downloads still appeared in the multi download menu
This commit is contained in:
@@ -595,10 +595,15 @@ export class MainComponent implements OnInit {
|
|||||||
if (this.path !== '-1') {
|
if (this.path !== '-1') {
|
||||||
this.downloadHelperMp3(this.path, is_playlist, false, new_download);
|
this.downloadHelperMp3(this.path, is_playlist, false, new_download);
|
||||||
}
|
}
|
||||||
}, error => { // can't access server
|
}, error => { // can't access server or failed to download for other reasons
|
||||||
this.downloadingfile = false;
|
this.downloadingfile = false;
|
||||||
this.current_download = null;
|
this.current_download = null;
|
||||||
new_download['downloading'] = false;
|
new_download['downloading'] = false;
|
||||||
|
// removes download from list of downloads
|
||||||
|
const downloads_index = this.downloads.indexOf(new_download);
|
||||||
|
if (downloads_index !== -1) {
|
||||||
|
this.downloads.splice(downloads_index)
|
||||||
|
}
|
||||||
this.openSnackBar('Download failed!', 'OK.');
|
this.openSnackBar('Download failed!', 'OK.');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -633,6 +638,11 @@ export class MainComponent implements OnInit {
|
|||||||
this.downloadingfile = false;
|
this.downloadingfile = false;
|
||||||
this.current_download = null;
|
this.current_download = null;
|
||||||
new_download['downloading'] = false;
|
new_download['downloading'] = false;
|
||||||
|
// removes download from list of downloads
|
||||||
|
const downloads_index = this.downloads.indexOf(new_download);
|
||||||
|
if (downloads_index !== -1) {
|
||||||
|
this.downloads.splice(downloads_index)
|
||||||
|
}
|
||||||
this.openSnackBar('Download failed!', 'OK.');
|
this.openSnackBar('Download failed!', 'OK.');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user