qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.61k stars 3.91k forks source link

Have an option to have Completion Moving before or after running an external script #5318

Open Viridel opened 8 years ago

Viridel commented 8 years ago

I have an external script that will auto-extract a RAR -or- directly copy an un-RAR'd MP4 or MKV. Currently, before the script will execute, the completion move will send the downloaded file(s) from my RAMdrive to my NAS. This means that before I can extract/copy, I have to wait for the NAS transfer to happen, AND then wait for the data to get copied back to my drive via the script - whereas a RAM extraction would be borderline instantaneous, and/or a copy from RAM to my (local) media storage, would be extremely quick (if not practically instantaneous, due to the drive buffer).

So while I have a really unique situation, fundamentally, the option to run a script before the Completion Move could be really handy for anyone using a secondary or torrent-specific storage drive. I'm not a programmer, but I would think this would just be setting an order of operations based on a 0/1 parameter? Is this a reasonable & viable request?

DrKittens commented 8 years ago

+1 IMHO completion moving should fire AFTER the script finishes by default if technically feasibly.

In its current state it is very difficult to automate what Viridel is attempting to do without qbittorent losing track of the original files or creating an IO error by attempting to do something to a file that has been moved or is in the process of moving.

We could potentially delay the move of the completed files by a user set amount to allow the run on completion script to fire first & complete.

(i kinda want to set my qbittorent up in the manner he has described above)

Viridel commented 8 years ago

I may have self-resolved the issue by expanding the script greatly. It's not nearly as elegant as what I'm requesting above (which has been seconded), but it is an effective solution. The post can be found here, and I've attached a copy of the working Batch file to THAT thread. https://qbforums.shiki.hu/index.php/topic,4223.msg22453.html#msg22453