allowing to cancle download_now tasks

This commit is contained in:
simon 2021-09-25 17:40:33 +07:00
parent 51ec765433
commit c165f152a9
2 changed files with 5 additions and 1 deletions

View File

@ -573,7 +573,10 @@ class PostData:
"""start downloading single vid now"""
youtube_id = self.exec_val
print("downloading: " + youtube_id)
download_single.delay(youtube_id=youtube_id)
running = download_single.delay(youtube_id=youtube_id)
task_id = running.id
print("set task id: " + task_id)
set_message("dl_queue_id", task_id, expire=False)
return {"success": True}
@staticmethod

View File

@ -76,6 +76,7 @@ function downloadNow(button) {
document.getElementById(youtube_id).remove();
setTimeout(function(){
handleInterval();
buildDownloadIcons();
}, 500);
}