* Added missing <cstdio> and <string> headers.

* Added 'd.wanted_chunks' command.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1259 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2011-08-01 02:51:13 +00:00
parent a6678a4591
commit 88260e4989
3 changed files with 5 additions and 4 deletions
+2 -3
View File
@@ -388,9 +388,8 @@ DownloadFactory::initialize_rtorrent(Download* download, torrent::Object* rtorre
if (rtorrent->has_key_value("total_uploaded"))
download->info()->mutable_up_rate()->set_total(rtorrent->get_key_value("total_uploaded"));
if (rtorrent->has_key_value("chunks_done"))
download->download()->set_chunks_done(std::min<uint32_t>(rtorrent->get_key_value("chunks_done"),
download->download()->file_list()->size_chunks()));
if (rtorrent->has_key_value("chunks_done") && rtorrent->has_key_value("chunks_wanted"))
download->download()->set_chunks_done(rtorrent->get_key_value("chunks_done"), rtorrent->get_key_value("chunks_wanted"));
download->set_throttle_name(rtorrent->has_key_string("throttle_name")
? rtorrent->get_key_string("throttle_name")