mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-08 23:29:21 +00:00
* Cleanup of command handling.
* Added 'd.timestamp.finished' that is set when a downloading torrent completes. For torrents that only seed it remains '0'.
* Added 'elapsed.{less,greater}' for checking the time elapsed since a time is less/greater, and it also returns false in all cases where the time is '0'.
* Fixed a bug that would cause hash checking to block exessively in some cases.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1233 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -654,8 +654,10 @@ initialize_command_download() {
|
||||
|
||||
// 0 - stopped
|
||||
// 1 - started
|
||||
CMD2_DL_VAR_VALUE("d.state", "rtorrent", "state");
|
||||
CMD2_DL_VAR_VALUE("d.complete", "rtorrent", "complete");
|
||||
CMD2_DL_VAR_VALUE("d.state", "rtorrent", "state");
|
||||
CMD2_DL_VAR_VALUE("d.complete", "rtorrent", "complete");
|
||||
|
||||
CMD2_FUNC_SINGLE ("d.incomplete", "not=(d.complete)");
|
||||
|
||||
// 0 off
|
||||
// 1 scheduled, being controlled by a download scheduler. Includes a priority.
|
||||
@@ -684,6 +686,8 @@ initialize_command_download() {
|
||||
CMD2_DL_VAR_VALUE("d.state_counter", "rtorrent", "state_counter");
|
||||
CMD2_DL_VAR_VALUE_PUBLIC("d.ignore_commands", "rtorrent", "ignore_commands");
|
||||
|
||||
CMD2_DL_VAR_VALUE("d.timestamp.finished", "rtorrent", "timestamp.finished");
|
||||
|
||||
CMD2_DL ("d.connection_current", std::bind(&torrent::option_as_string, torrent::OPTION_CONNECTION_TYPE, CMD2_ON_DL(connection_type)));
|
||||
CMD2_DL_STRING("d.connection_current.set", std::bind(&apply_d_connection_type, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
@@ -748,6 +752,7 @@ initialize_command_download() {
|
||||
CMD2_DL ("d.completed_chunks", CMD2_ON_FL(completed_chunks));
|
||||
CMD2_DL ("d.left_bytes", CMD2_ON_FL(left_bytes));
|
||||
|
||||
CMD2_DL_V ("d.tracker_announce", std::bind(&torrent::TrackerList::manual_request, CMD2_BIND_TL, false));
|
||||
CMD2_DL ("d.tracker_numwant", std::bind(&torrent::TrackerList::numwant, CMD2_BIND_TL));
|
||||
CMD2_DL_VALUE_V ("d.tracker_numwant.set", std::bind(&torrent::TrackerList::set_numwant, CMD2_BIND_TL, std::placeholders::_2));
|
||||
CMD2_DL ("d.tracker_focus", std::bind(&torrent::TrackerList::focus_index, CMD2_BIND_TL));
|
||||
|
||||
Reference in New Issue
Block a user