[Libtorrent-devel] Primitive torrent queue manager
Jari Sundell
jaris at student.matnat.uio.no
Fri May 11 21:59:06 UTC 2007
Shaun Dennie wrote:
>
> 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).
Well, usually for these kinds of copy-n-paste kind of changes, it would
be accepted assuming you put the patch under public domain. And this
particular change is something I've been considering doing some day.
Jari Sundell
More information about the Libtorrent-devel
mailing list