* Added "tracker_numwant" option for setting the numwant field sent to

the tracker.

* Added display for the up/down rate total in download info.

* Use completed bytes from Content for download progress reported to
the tracker, rather than download rate total.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@786 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-10-11 11:46:33 +00:00
parent 8f311cda47
commit 29ef815d0e
7 changed files with 69 additions and 23 deletions
+8
View File
@@ -42,6 +42,7 @@
#include <sigc++/signal.h>
#include <rak/path.h>
#include <torrent/exceptions.h>
#include <torrent/rate.h>
#include <torrent/torrent.h>
#include <torrent/tracker.h>
#include <torrent/tracker_list.h>
@@ -97,8 +98,15 @@ Download::Download(download_type d) :
m_variables.insert("max_peers", new utils::VariableValueSlot(rak::mem_fn(&m_download, &download_type::peers_max), rak::mem_fn(&m_download, &download_type::set_peers_max)));
m_variables.insert("max_uploads", new utils::VariableValueSlot(rak::mem_fn(&m_download, &download_type::uploads_max), rak::mem_fn(&m_download, &download_type::set_uploads_max)));
m_variables.insert("up_rate", new utils::VariableValueSlot(rak::mem_fn(m_download.up_rate(), &torrent::Rate::rate), NULL));
m_variables.insert("up_total", new utils::VariableValueSlot(rak::mem_fn(m_download.up_rate(), &torrent::Rate::total), NULL));
m_variables.insert("down_rate", new utils::VariableValueSlot(rak::mem_fn(m_download.down_rate(), &torrent::Rate::rate), NULL));
m_variables.insert("down_total", new utils::VariableValueSlot(rak::mem_fn(m_download.down_rate(), &torrent::Rate::total), NULL));
m_variables.insert("priority", new utils::VariableValueSlot(rak::mem_fn(this, &Download::priority), rak::mem_fn(this, &Download::set_priority)));
m_variables.insert("tracker_numwant", new utils::VariableValueSlot(rak::mem_fn(&m_trackerList, &tracker_list_type::numwant), rak::mem_fn(&m_trackerList, &tracker_list_type::set_numwant)));
m_variables.insert("ignore_commands", new utils::VariableObject(bencode(), "rtorrent", "ignore_commands", torrent::Object::TYPE_VALUE));
}
+1
View File
@@ -176,6 +176,7 @@ DownloadFactory::receive_success() {
download->variable()->set("max_uploads", control->variable()->get("max_uploads"));
download->variable()->set("min_peers", control->variable()->get("min_peers"));
download->variable()->set("max_peers", control->variable()->get("max_peers"));
download->variable()->set("tracker_numwant", control->variable()->get("tracker_numwant"));
if (download->variable()->get_value("complete") != 0) {
if (control->variable()->get_value("min_peers_seed") >= 0)