mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-17 07:32:32 +00:00
Don't delay scraping for newly added torrents
This commit is contained in:
@@ -106,7 +106,8 @@ DownloadFactory::DownloadFactory(Manager* m) :
|
||||
m_session(false),
|
||||
m_start(false),
|
||||
m_printLog(true),
|
||||
m_isFile(false) {
|
||||
m_isFile(false),
|
||||
m_initLoad(false) {
|
||||
|
||||
m_taskLoad.slot() = std::bind(&DownloadFactory::receive_load, this);
|
||||
m_taskCommit.slot() = std::bind(&DownloadFactory::receive_commit, this);
|
||||
@@ -275,9 +276,10 @@ DownloadFactory::receive_success() {
|
||||
|
||||
if (!rpc::call_command_value("trackers.use_udp"))
|
||||
download->enable_udp_trackers(false);
|
||||
|
||||
// Don't force the trackers to scrape when rTorrent first starts
|
||||
download->set_resume_flags(torrent::Download::start_skip_tracker);
|
||||
|
||||
// Skip forcing trackers to scrape when rtorrent starts
|
||||
if (m_initLoad)
|
||||
download->set_resume_flags(torrent::Download::start_skip_tracker);
|
||||
|
||||
// Check first if we already have these values set in the session
|
||||
// torrent, so that it is safe to change the values.
|
||||
|
||||
@@ -77,6 +77,9 @@ public:
|
||||
|
||||
bool get_start() const { return m_start; }
|
||||
void set_start(bool v) { m_start = v; }
|
||||
|
||||
bool get_init_load() const { return m_initLoad; }
|
||||
void set_init_load(bool v) { m_initLoad = v; }
|
||||
|
||||
bool print_log() const { return m_printLog; }
|
||||
void set_print_log(bool v) { m_printLog = v; }
|
||||
@@ -106,6 +109,7 @@ private:
|
||||
bool m_start;
|
||||
bool m_printLog;
|
||||
bool m_isFile;
|
||||
bool m_initLoad;
|
||||
|
||||
command_list_type m_commands;
|
||||
torrent::Object::map_type m_variables;
|
||||
|
||||
Reference in New Issue
Block a user