StefanLobbenmeier / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
1.55k stars 62 forks source link

Cancelling the download process doesn't stop/kill the existing yt-dlp.exe processes #14

Open dizzy-egg opened 1 year ago

dizzy-egg commented 1 year ago

Describe the bug Cancelling a download doesn't kill the underlying yt-dlp.exe processes. They continue to download/write files unless killed manually.

To Reproduce Steps to reproduce the behavior:

  1. Start the download of a YouTube playlist
  2. Click the stop/cancel button after a few seconds
  3. Note that yt-dlp.exe processes still exist in task manager

Expected behavior All child processes should be killed.

Additional info (please complete the following information):

StefanLobbenmeier commented 1 year ago

Thats a good catch and I have to admit it is quite annoying. That part of the code is quite hard to work with anyway, so I would like to avoid fixing it there and having a complete rewrite of it later, fixing this.

If someone wants to fix this, it would most likely involve saving the process object on start and stopping it in Query.stop (modules/types/Query.js:13)

DjordjeMandic commented 1 year ago

I can confirm this, while i was downloading long playlist with 8 concurrent jobs it kept them active until they finished.

m4heshd commented 10 months ago

@StefanLobbenmeier FYI, I use tree-kill in ufc-ripper and it has never failed to deal with the yt-dlp process so far. I wish I had the time to send a PR your way.