* 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:
rakshasa
2011-06-05 07:11:59 +00:00
parent ff477d3f7a
commit 1e206cb1c4
10 changed files with 108 additions and 21 deletions
+2
View File
@@ -368,6 +368,8 @@ DownloadFactory::initialize_rtorrent(Download* download, torrent::Object* rtorre
rtorrent->insert_preserve_copy("complete", (int64_t)0);
rtorrent->insert_preserve_copy("hashing", (int64_t)Download::variable_hashing_stopped);
rtorrent->insert_preserve_copy("timestamp.finished", (int64_t)0);
rtorrent->insert_preserve_copy("tied_to_file", "");
rtorrent->insert_key("loaded_file", m_isFile ? m_uri : std::string());
+3 -2
View File
@@ -533,8 +533,9 @@ DownloadList::hash_done(Download* download) {
control->core()->push_log("Hash check on download completion found bad chunks, consider using \"safe_sync\".");
rpc::commands.call_catch("event.download.hash_final_failed", rpc::make_target(download), torrent::Object(), "Download event action failed: ");
}
break;
// TODO: Should we skip the 'hash_done' event here?
return;
case Download::variable_hashing_stopped:
default: