rtorrent icon indicating copy to clipboard operation
rtorrent copied to clipboard

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

Open HarryMuscle opened this issue 2 years ago • 4 comments

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 avatar Jan 01 '22 22:01 HarryMuscle

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.

HarryMuscle avatar Jan 02 '22 21:01 HarryMuscle

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

Not a priority atm.

rakshasa avatar Jan 03 '22 15:01 rakshasa

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.

HarryMuscle avatar Jan 03 '22 16:01 HarryMuscle

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

rakshasa avatar Jan 03 '22 19:01 rakshasa