Thank you for a quick and informative reply. Let me just check that
i understand....see below
7 nov 2007 kl. 19.30 skrev Josef Drexler:
On Nov 7, 2007, at 6:22 PM, Örjan Nordlund wrote:
Hi !
This is probably a newbie question but....
I have a script that unpacks all .rar files in a dirtree to my
"real" directory depending on type of download. This is currently
running as cronjob but i would really like to invoke it after the
torrent has been moved...
as the example .rtorrent.rc:
# On completion, move the torrent to the directory from custom1.
on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,
$d.get_custom1= ;d.set_directory=$d.get_custom1="
This already runs two commands:
1. execute=mv,-u,$d.get_base_path=,$d.get_custom1=
2. d.set_directory=$d.get_custom1=
So my solution to this would be to add a third command as such:
on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,
$d.get_custom1= ;d.set_directory=$d.get_custom1=;execute=unpackrar,
$d.get_custom1=,$d.get_custom2= "
Preceeding this would be a line like this:
schedule = watch_directory_2,10,10,"load_start=/home/<user>/watch/
tvshows/*.torrent,d.set_custom1=/home/<user>/download/
tvshows/,d.set_custom2=/home/<user>/tvshows/"
Am i on the right track here ???
I suppose i could extend the on_ events (on_complete??) to run a
script that deletes the data from the torrent after seeding it to a
good enough ratio...
I am really glad for the program...it is simply the best out there..
Adding a third will work just as well.
i would like to add a line something like
on_finished = unpack_complete,"execute=~/scripts/unpackrar.py
<from dir> <to dir>
That should be fine too, although then the order of execution with
respect to other on_finished entries is not guaranteed[*], i.e.
this command might be run before or after the move_complete
commands. But as long as you use $d.get_base_path= here instead of
a hardcoded path, it might not matter.
[*] Currently they will be processed in alphabetical order of the
tags, but I don't know if that might change in the future.
This requires that i can keep two directories in custom vars and
that i can access these in the command line. Furthermore i need to
know that the previous command has finished (the move in my case)
Not a problem. You have five custom vars.
--
Josef Drexler
[EMAIL PROTECTED]
Örjan Nordlund
[EMAIL PROTECTED]
+46 709 73 81 01
_______________________________________________
Libtorrent-devel mailing list
[email protected]
http://rakshasa.no/mailman/listinfo/libtorrent-devel