Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run external program does not wait for files to be moved #11842

Open
napei opened this issue Jan 8, 2020 · 2 comments
Open

Run external program does not wait for files to be moved #11842

napei opened this issue Jan 8, 2020 · 2 comments
Labels
Core Triggers Procedures activated when state changes occur (i.e. torrent completes)

Comments

@napei
Copy link

napei commented Jan 8, 2020

qBittorrent version and Operating System

4.1.9.1
Windows 10 Pro (10.0.1xxxx)

What is the problem

"Run external program on torrent completion" does not appear to wait for torrent's to finish moving, causing issues when trying to run auto-extraction programs on them or using file managers to handle state of media.

What is the expected behavior

It would be nice, if "torrent completion" could refer to after it has been moved, rechecked, or started seeding.

Steps to reproduce

Download any torrent.
Enable automatic management and have torrent moved to different directory when download, and another when seeding.
Add a command to run after torrent completion that does something like extract the archive.
Nothing appears to happen, because the torrent doesn't seem to be there yet

Extra info(if any)

The most common solution that I know of and use is to just encapsulate the external program in cmd /c "timeout /t 10 & externalprogram.exe", and while this works fine, giving a 10 second timeout, shouldn't be needed as it causes confusion. Furthermore, if the moving operation is between drives on the PC, then 10 seconds may not be enough, and the timeout would need to become dynamic based on the torrent size which isn't friendly. This is for windows (cmd.exe) so I'm not sure of other operating systems.

Disclaimer: this issue may already be fixed in 4.2, and also could already be an issue in progress. Just bugging me for a while.

@UnconditionalLoop
Copy link

It's a been a year and this still hasn't been fixed! Since external applications are based on %D path, any files created or changed, end up getting left over and never moved!

Easy fix! Make external program run AFTER the files have been moved to the proper folder based on their category setting.

@luzpaz
Copy link
Contributor

luzpaz commented Jun 11, 2023

Related to #10206

@luzpaz luzpaz added the Triggers Procedures activated when state changes occur (i.e. torrent completes) label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Triggers Procedures activated when state changes occur (i.e. torrent completes)
Projects
None yet
Development

No branches or pull requests

4 participants