mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-05 17:52:29 +00:00
Added intermediate requesting flag for trackers to prevent premature deletion.
This commit is contained in:
@@ -81,10 +81,10 @@ apply_enable_trackers(int64_t arg) {
|
||||
|
||||
void
|
||||
initialize_command_tracker() {
|
||||
CMD2_TRACKER ("t.is_busy", std::bind(&torrent::tracker::Tracker::is_busy, std::placeholders::_1));
|
||||
CMD2_TRACKER ("t.is_busy", std::bind(&torrent::tracker::Tracker::is_requesting, std::placeholders::_1));
|
||||
CMD2_TRACKER ("t.is_enabled", std::bind(&torrent::tracker::Tracker::is_enabled, std::placeholders::_1));
|
||||
CMD2_TRACKER ("t.is_extra_tracker", std::bind(&torrent::tracker::Tracker::is_extra_tracker, std::placeholders::_1));
|
||||
CMD2_TRACKER ("t.is_open", std::bind(&torrent::tracker::Tracker::is_busy, std::placeholders::_1));
|
||||
CMD2_TRACKER ("t.is_open", std::bind(&torrent::tracker::Tracker::is_requesting, std::placeholders::_1));
|
||||
CMD2_TRACKER ("t.is_scrapable", std::bind(&torrent::tracker::Tracker::is_scrapable, std::placeholders::_1));
|
||||
CMD2_TRACKER ("t.is_usable", std::bind(&torrent::tracker::Tracker::is_usable, std::placeholders::_1));
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ print_download_status(char* first, char* last, core::Download* d) {
|
||||
|
||||
} else if (d->tracker_controller().has_active_trackers_not_scrape()) {
|
||||
auto tracker = d->tracker_controller().find_if([](const auto& t) {
|
||||
return t.is_busy_not_scrape();
|
||||
return t.is_requesting_not_scrape();
|
||||
});
|
||||
|
||||
if (tracker.is_valid()) {
|
||||
|
||||
@@ -51,9 +51,9 @@ WindowTrackerList::redraw() {
|
||||
if (pos < m_canvas->height()) {
|
||||
const char* state;
|
||||
|
||||
if (tracker.is_busy_not_scrape())
|
||||
if (tracker.is_requesting_not_scrape())
|
||||
state = "req ";
|
||||
else if (tracker.is_busy())
|
||||
else if (tracker.is_requesting())
|
||||
state = "scr ";
|
||||
else
|
||||
state = " ";
|
||||
@@ -79,7 +79,7 @@ WindowTrackerList::redraw() {
|
||||
m_canvas->set_attr(4, pos - 1, m_canvas->width(), is_focused() ? A_REVERSE : A_BOLD, COLOR_PAIR(0));
|
||||
}
|
||||
|
||||
if (tracker.is_busy()) {
|
||||
if (tracker.is_requesting()) {
|
||||
m_canvas->set_attr(0, pos - 2, 4, A_REVERSE, COLOR_PAIR(0));
|
||||
m_canvas->set_attr(0, pos - 1, 4, A_REVERSE, COLOR_PAIR(0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user