Question/help with "on finished" command

lisas4567

Member
May 25, 2018
773
0
16
I'm trying to come up with a better way to download files automatically from my seedbox. In the past i've used rsync but this basically means i have to keep files in a non-sorted location until i decide to delete them from the seedbox as well, and i like to seed my torrents for a long time, so this can be annoying.



What i'm trying to do is this:

Right now i have rutorrent set to move complete torrents via autotools. What i would like to do is also create a symbolic link to the data in another folder after it's moved. The reason for this is it would make downloading the data via a cron script easier, i could write a script which checked for the sym links, downloaded the data then delete the link. Does anyone think they could help extend autotools to do this?


Either that, or i'd like some method to "push" on completion. any help would be appreciated.
 

saroos1

Member
May 25, 2018
718
0
16
I use bittorrent to transfer files to/from my box, e.g. "beam-me-home-scotty completed=-2h" gets all stuff completed in the last 2 hours (mostly, I select by name, just an example). Powered by bash, bttrack, sshfs, cron, and rtcontrol. wink.gif

What you described can be done like this:

Code:
rtcontrol 'tagged=!synced' 'path=!' is_complete=yes is_ghost=no --tag synced --yes -qo 'ln -s "$(realpath)s" "~/rtorrent/sync_queue/"' | bash

This would add a symlink to ~/rtorrent/sync_queue for any item that completed but wasn't added to the queue previously. Cron that, done.

And finally, a simple on_finished event handler would do that, too.