From ef5ad51984d3df2a1adb5a735e89f47193075225 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 20 Jan 2024 22:26:59 +0300 Subject: [PATCH] Add process kill --- src/renderer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/renderer.js b/src/renderer.js index 05bd4f1..a051c89 100644 --- a/src/renderer.js +++ b/src/renderer.js @@ -1116,7 +1116,10 @@ function download( } getId(randomId + ".close").addEventListener("click", () => { - controller.abort(); + controller.abort() + try { + process.kill(downloadProcess.ytDlpProcess.pid, 'SIGHINT') + } catch (_error) {} }); downloadProcess