Downloads restarted from home page now persist after restarting rather than disappearing

This commit is contained in:
Isaac Abadi
2023-03-27 19:15:14 -04:00
parent 07a0ea6d18
commit 0bdac15ef1
7 changed files with 30 additions and 8 deletions

View File

@@ -86,10 +86,10 @@ exports.resumeDownload = async (download_uid) => {
exports.restartDownload = async (download_uid) => {
const download = await db_api.getRecord('download_queue', {uid: download_uid});
await exports.clearDownload(download_uid);
const success = !!(await exports.createDownload(download['url'], download['type'], download['options'], download['user_uid']));
const new_download = await exports.createDownload(download['url'], download['type'], download['options'], download['user_uid']);
should_check_downloads = true;
return success;
return new_download;
}
exports.cancelDownload = async (download_uid) => {