rakshasa / rtorrent

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

New Command Syntax Doesn't Work With method.set_key Command and/or event.download.finished Event #1139

Open HarryMuscle opened 2 years ago

HarryMuscle commented 2 years ago

According to the rTorrent Handbook, the new syntax for calling commands is:

(command, args1, ...)

However, this syntax doesn't work in the following simple example:

method.set_key = event.download.finished, stop_finished, "(d.stop)"

I also tried double parenthesis to pass the command unevaluated and it also doesn't stop the torrent when downloading is finished.

Changing the d.stop call to the old syntax works as expected and the torrent is stopped when downloading is finished:

method.set_key = event.download.finished, stop_finished, "d.stop="

HarryMuscle commented 2 years ago

After more testing I think the actual issue might be that the d.stop method (and possibly the d.close method) cannot be called using the new command syntax.

rakshasa commented 2 years ago

The methods don't accept the new command types, only plain strings.

Not a priority atm.

HarryMuscle commented 2 years ago

The methods don't accept the new command types, only plain strings.

Not a priority atm.

Is there documentation anywhere which methods do accept the new syntax and which don't? The rTorrent Handbook seems to use it for some and not others and I think most people would assume that it's just old examples vs new examples not actually an issue with support.

rakshasa commented 2 years ago

No, there isn't. Someone should add that detail to the handbook.