[Libtorrent-devel] Primitive torrent queue manager

Shaun Dennie shaundennie at gmail.com
Fri May 11 21:35:51 UTC 2007


I forgot to mention that I modified the apply_stop_on_ratio function in
option_handler_rules.cc to not only call stop_try but also erase.  The
modification looks like this:

    if ((totalUpload >= minUpload && totalUpload * 100 >= totalDone *
minRatio)
 ||
        (maxRatio > 0 && totalUpload * 100 > totalDone * maxRatio)) {
      if(control->core()->download_list()->stop_try(*itr))
          itr = control->core()->download_list()->erase(itr);
      else
          ++itr;
    }
    else
        ++itr;


That's sort of a quick hack but, I can probably do it properly by making a
remove_on_ratio configuration option and having apply_remove_on_ratio and
apply_stop_on_ratio share the same code except for the erase part.  I'm not
sure if patches are being accepted but I'd be happy to code it up and submit
it (when I manage to get some time).

    Shaun

On 4/30/07, Max Bordelon <max.bordelon at gmail.com> wrote:
>
> Shaun,
> Thanks for the script.  However, how do you get rtorrent to close the
> torrent once it is stopped by schedule so that the session is removed from
> the session directory?  My torrents show as "OPEN" after rtorrent stops them
> and thus a session file still exists for it.
>
> Regards,
> Max
>
> _______________________________________________
> Libtorrent-devel mailing list
> Libtorrent-devel at rakshasa.no
> http://rakshasa.no/mailman/listinfo/libtorrent-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rakshasa.no/pipermail/libtorrent-devel/attachments/20070511/430fa42f/attachment.html


More information about the Libtorrent-devel mailing list