Ticket #1203 (new enhancement)

Opened 4 years ago

Last modified 4 years ago

load_* commands do not return a useful value

Reported by: anonymous Owned by: rakshasa
Priority: normal Component: rtorrent
Version: Severity: normal
Keywords: xmlrpc Cc:

Description

I've been trying to use 'load_raw' command via XMLRPC to load new torrents (with rtorrent 0.7.9). It works, but one thing is very frustrating. The XMLRPC response is always '0' regardless of whether loading succeeded of failed. Even if the torrent has been loaded it is difficult to identify it in the torrent list later. I think It would be very useful if 'load_*' commands would return the info hash of the loaded torrent on success and something else (like an empty string or even an XMLRPC fault) on failure.

Change History

Changed 4 years ago by anonymous

Loading and parsing the torrent happens asynchronously. It doesn't complete until after the call returns; e.g. when it's an URL it has to be fetched first etc., hence rtorrent cannot determine success or failure yet.

If the torrent is local you can get the info-hash from the file directly, however. Alternatively have rtorrent create a symlink when the download is added by appending the command to the load argument list, or using on_load.

Changed 4 years ago by anonymous

For non-URL loads you can also check d.get_loaded_file and compare with the file you submitted for loading. Requires recent SVN version.

Note: See TracTickets for help on using tickets.