Add "trackers.delay_scrape" command

This commit is contained in:
stickz
2022-04-28 12:37:24 -04:00
committed by Jari Sundell
parent 2e1a499942
commit c7c290a86b
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -159,6 +159,7 @@ initialize_command_tracker() {
CMD2_ANY_VALUE ("trackers.disable", std::bind(&apply_enable_trackers, int64_t(0)));
CMD2_VAR_VALUE ("trackers.numwant", -1);
CMD2_VAR_BOOL ("trackers.use_udp", true);
CMD2_VAR_BOOL {"trackers.delay_scrape", true);
CMD2_ANY_STRING_V ("dht.mode.set", std::bind(&core::DhtManager::set_mode, control->dht_manager(), std::placeholders::_2));
CMD2_VAR_VALUE ("dht.port", int64_t(6881));
+1 -1
View File
@@ -278,7 +278,7 @@ DownloadFactory::receive_success() {
download->enable_udp_trackers(false);
// Skip forcing trackers to scrape when rtorrent starts
if (m_initLoad)
if (m_initLoad && rpc::call_command_value("trackers.delay_scrape"))
download->set_resume_flags(torrent::Download::start_skip_tracker);
// Check first if we already have these values set in the session