Rtorrent: branch not branching

Created on 17 Nov 2018  路  8Comments  路  Source: rakshasa/rtorrent

I am adding torrents via a watch directory and manually. I would like to move the torrents added via watch directory when they are finished. I am using a custom var to do that. Here is my code:

schedule2 = watch_directory_rss,10,10,"load.start=/data/watch/rss/*.torrent,\"d.custom.set=donedirset,1\",\"d.custom.set=donedir,/data/done/torrent/rss/\",print=\"schedload\""

method.set_key = event.download.finished,check_customdir,"branch=d.custom=donedirset,$printJA=,$printNEIN="

Both(!) methods (printJA and printNEIN) are started, regardless of whether the torrents are added by watch directory or manually. The second custom var (donedirset) was not there in first place, I tought branch might not working correctly on a string, so I added another var like it is used in the wiki.

Is it a bug or am I doing something wrong?

All 8 comments

It should work, maybe you need cat for strings, try this:

schedule2 = watch_directory_rss, 10, 10 ,"load.start=/data/watch/rss/*.torrent,\"d.custom.set=donedir,$cat=/data/done/torrent/rss/\""

method.set_key = event.download.finished, check_customdir, "branch=d.custom=donedir, print=JA, print=NEIN"

It should work, maybe you need cat for strings, try this:

schedule2 = watch_directory_rss, 10, 10 ,"load.start=/data/watch/rss/*.torrent,\"d.custom.set=donedir,$cat=/data/done/torrent/rss/\""

method.set_key = event.download.finished, check_customdir, "branch=d.custom=donedir, print=JA, print=NEIN"

thx for your reply - but the behavior is still the same :confounded:: both print-cmds occure.

I tried out for you what I've posted with 0.9.7 and it's working here (only "JA" is displayed), so there must be other issues in your config.
The event.donload.finished line is fine, you can check whether the custom attribute is set by placing the cursor on the download and hit CTRL+x and run (you should see "/data/done/torrent/rss/"):

print=$d.custom=donedir

Which rtorrent version do you use?

Thank so much for testing it.

The custom attribute is set, I already tested it. I am running Debian stable, rtorrent version is 0.9.6.

I am using multiple lines with event.download.finished - is that a problem?

Remove the early evaluation that you have in your 1st post, if that is still in there.

Still the same result :-(

My current complete .rtorrent.rc: https://gist.github.com/chris400/5e7dcc68fae352d625e0406284b43279

again, remove the $ evaluation, which causes that problem.

again, remove the $ evaluation, which causes that problem.

Sorry, I did not understand in 1st place. It is working now!
Pls give some details why it did not work with $

Was this page helpful?
0 / 5 - 0 ratings