mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 14:12:31 +00:00
* Added "upload_total_clear" option that clears the total upload
counter when loading session torrents. * Use the TrackerInfo pointer (to be renamed) as an identifier for downloads, rather than the hash. * Partially converted to using a new wrapper for sockaddr, which will allow IPv6. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@642 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -186,9 +186,17 @@ DownloadFactory::receive_success() {
|
||||
(*itr)->variables()->set("max_peers", control->variables()->get("max_peers"));
|
||||
(*itr)->variables()->set("max_uploads", control->variables()->get("max_uploads"));
|
||||
|
||||
if (control->variables()->get("use_udp_trackers").as_string() == "no")
|
||||
if (control->variables()->get_string("use_udp_trackers") == "no")
|
||||
(*itr)->enable_udp_trackers(false);
|
||||
|
||||
// Move some of this to "rtorrent".
|
||||
if (root.has_key("libtorrent resume")) {
|
||||
torrent::Bencode& libtorrent = root.get_key("libtorrent resume");
|
||||
|
||||
if (control->variables()->get_string("upload_total_clear") == "yes")
|
||||
libtorrent.erase_key("total_uploaded");
|
||||
}
|
||||
|
||||
if (m_session) {
|
||||
if (!rtorrent.has_key("directory") ||
|
||||
!rtorrent.get_key("directory").is_string())
|
||||
|
||||
Reference in New Issue
Block a user