On Jan 25, 2009, at 5:22 PM, Johan Gunnarsson wrote:
Something like this seems to work here (0.8.2/0.12.2.)
schedule=seed_timer,0,60,"d.multicall=seeding,\"branch=\\
\"$greater=to_elapsed_time=$d.get_state_changed=,d.get_custom1=\\
\",d.stop=\""
This will make your torrent seed for 9 hours:
d.set_custom1=" 9:00:00"
Watch out when elapsed time goes past 100 hours. The string comparison
will probably fail. Also, with a hypothetical sub= command that
returns the difference between two integers, string comparison can be
avoided.
Actually that'll stop if 9 hours after it was started, regardless of
how much time of that was spent seeding. Unless you always stop and
start a download when it completes, because otherwise state_changed
won't be updated. (Unless that worked differently in 0.8.2, but in
0.8.4 it never updates for me unless I manually stop/start the
download. And maybe enabling check_hash might affect that too.)
--
Josef Drexler
[email protected]
_______________________________________________
Libtorrent-devel mailing list
[email protected]
http://rakshasa.no/mailman/listinfo/libtorrent-devel