rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.07k stars 408 forks source link

d.multicall2 not working. #1091

Closed anon-127 closed 2 years ago

anon-127 commented 3 years ago
method.insert = my_log, simple|private,\
"execute.throw = sh, -c, (cat, \"echo \", (argument.0) ,  >>/media/rtorrent/mylog)"

d.multicall2=main,(cat, "my_log=", $d.hash= )
pyroscope commented 3 years ago

That is not how multicall works, passing the hash is implicit.

ghost commented 3 years ago

even d.name won't work. d.multicall2=main,(cat, "my_log=", $d.name= )

kannibalox commented 3 years ago

Try d.multicall2=main,my_log=$d.hash= instead.

anon-127 commented 3 years ago

this also didn't work.

netty0 commented 2 years ago

I could never get multicall to work properly

kannibalox commented 2 years ago

It worked just fine for me, here are the exact steps I did:

$ wc -l /tmp/mylog # Just to show it doesn't exist yet
wc: /tmp/mylog: No such file or directory
$ rtxmlrpc -i 'method.insert = my_log, simple|private,"execute.throw = sh, -c, (cat
, \"echo \", (argument.0) ,  >>/tmp/mylog)"'
0
$ rtxmlrpc -i 'd.multicall2=main,my_log=$d.hash='
0
$ wc -l /tmp/mylog # Now contains the hashes
88 /tmp/mylog

The same thing should also work when done via Ctrl-x or in a config file. Many clients (e.g. ruTorrent) depend heavily on d.multicall, it's a little confusing but in no way broken.