mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 14:49:21 +00:00
* Show "Hashing:" for torrents that are queued for hashing.
* Allow different min/max peers setting for seeding. Patch by Josef Drexler. * Man page entry for "safe_sync" and "max/min_peers_seed". * The p,o,i,u keys are now bound so they change ElementMenu directly. * Bound ^P and ^N for moving up/down. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@758 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -172,10 +172,21 @@ DownloadFactory::receive_success() {
|
||||
// Move to 'rtorrent'.
|
||||
download->variable()->set("connection_leech", m_variables.get("connection_leech"));
|
||||
download->variable()->set("connection_seed", m_variables.get("connection_seed"));
|
||||
download->variable()->set("min_peers", control->variable()->get("min_peers"));
|
||||
download->variable()->set("max_peers", control->variable()->get("max_peers"));
|
||||
download->variable()->set("max_uploads", control->variable()->get("max_uploads"));
|
||||
|
||||
if (download->variable()->get_value("complete") != 0) {
|
||||
|
||||
if (control->variable()->get_value("min_peers_seed") >= 0)
|
||||
download->variable()->set("min_peers", control->variable()->get("min_peers_seed"));
|
||||
else
|
||||
download->variable()->set("min_peers", control->variable()->get("min_peers"));
|
||||
|
||||
if (control->variable()->get_value("max_peers_seed") >= 0)
|
||||
download->variable()->set("max_peers", control->variable()->get("max_peers_seed"));
|
||||
else
|
||||
download->variable()->set("max_peers", control->variable()->get("max_peers"));
|
||||
}
|
||||
|
||||
if (!control->variable()->get_value("use_udp_trackers"))
|
||||
download->enable_udp_trackers(false);
|
||||
|
||||
|
||||
@@ -439,10 +439,12 @@ DownloadList::hash_done(Download* download) {
|
||||
|
||||
case Download::variable_hashing_last:
|
||||
|
||||
if (download->is_done())
|
||||
if (download->is_done()) {
|
||||
confirm_finished(download);
|
||||
else
|
||||
download->set_message("Hash check on download completion found bad chunks.");
|
||||
} else {
|
||||
download->set_message("Hash check on download completion found bad chunks, consider using \"safe_sync\".");
|
||||
control->core()->push_log("Hash check on download completion found bad chunks, consider using \"safe_sync\".");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -501,6 +503,12 @@ DownloadList::confirm_finished(Download* download) {
|
||||
download->set_connection_type(download->variable()->get_string("connection_seed"));
|
||||
download->set_priority(download->priority());
|
||||
|
||||
if (download->variable_value("min_peers") == control->variable()->get_value("min_peers") && control->variable()->get_value("min_peers_seed") >= 0)
|
||||
download->variable()->set("min_peers", control->variable()->get("min_peers_seed"));
|
||||
|
||||
if (download->variable_value("max_peers") == control->variable()->get_value("max_peers") && control->variable()->get_value("max_peers_seed") >= 0)
|
||||
download->variable()->set("max_peers", control->variable()->get("max_peers_seed"));
|
||||
|
||||
// Do this before the slots are called in case one of them closes
|
||||
// the download.
|
||||
if (!download->is_active() && control->variable()->get_value("session_on_completion") != 0) {
|
||||
|
||||
Reference in New Issue
Block a user