prevent completed download restart

This commit is contained in:
2024-07-02 11:37:06 +02:00
parent 98f0ea3bd2
commit 3edebbdb6c
4 changed files with 34 additions and 20 deletions

View File

@@ -198,6 +198,9 @@ func (p *Process) Complete() {
// Kill a process and remove it from the memory
func (p *Process) Kill() error {
defer func() {
p.Progress.Status = StatusCompleted
}()
// yt-dlp uses multiple child process the parent process
// has been spawned with setPgid = true. To properly kill
// all subprocesses a SIGTERM need to be sent to the correct