[Libtorrent-devel] Questions regarding event.download events and set_custom variables

Jason Lawrence jjlawren+libtorrent at gmail.com
Tue Oct 26 13:43:40 UTC 2010

Sorry, didn't include lines from my rtorrent.rc:

# Watch directories
schedule = watch_directory_main,5,10,"load_start=/rtorrent/.torrents/*.torrent"
schedule = watch_directory_other,5,10,"load_start=/rtorrent/.other/.torrents/*.torrent,d.set_custom3=/rtorrent/.other/"

# Set custom3 if empty
system.method.insert = setfallbackdir,simple,"d.set_custom3=/rtorrent/"
system.method.set_key =

# Move torrents on finished to custom3 directory location
system.method.set_key =

On Tue, Oct 26, 2010 at 8:40 AM, Jason Lawrence
<jjlawren+libtorrent at gmail.com> wrote:
> I put together some commands to do the following:
> 1) Load .torrent files from a primary watch location, leaving custom3 empty
> 2) Load .torrent files from a secondary watch location, which also
> sets the custom3 variable with a directory
> 3) Check for torrents with custom3 unset on event.download.opened, and
> set to a default if empty
> Unfortunately, every torrent regardless of start location gets custom3
> set to the default value by the event.download.opened function below,
> overwriting the directory set in step 2 above. Is there a reliable
> order the event.download triggers are fired, or is there a better way
> to handle this functionality? Does it take time for d.set_custom3 to
> complete?
> Also, what specifically triggers event.download.opened and
> event.download.resumed? Are both triggered on the initial load?

More information about the Libtorrent-devel mailing list