From a018cfa56c455062493e5789852fae728e46f527 Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Fri, 31 Jan 2025 06:23:04 +0300 Subject: [PATCH] Remove stopped torrent from "error" tracker filter PR #22219. --- src/gui/transferlistfilters/trackersfilterwidget.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/transferlistfilters/trackersfilterwidget.cpp b/src/gui/transferlistfilters/trackersfilterwidget.cpp index 3379b48bd..889c526b9 100644 --- a/src/gui/transferlistfilters/trackersfilterwidget.cpp +++ b/src/gui/transferlistfilters/trackersfilterwidget.cpp @@ -444,6 +444,16 @@ void TrackersFilterWidget::handleTrackerStatusesUpdated(const BitTorrent::Torren trackerErrorHashesIt = m_trackerErrors.insert(id, {}); trackerErrorHashesIt->insert(trackerEntryStatus.url); } + else if (trackerEntryStatus.state == BitTorrent::TrackerEndpointState::NotContacted) + { + // remove tracker from "error", "tracker error" and "warning" categories + if (warningHashesIt != m_warnings.end()) + warningHashesIt->remove(trackerEntryStatus.url); + if (errorHashesIt != m_errors.end()) + errorHashesIt->remove(trackerEntryStatus.url); + if (trackerErrorHashesIt != m_trackerErrors.end()) + trackerErrorHashesIt->remove(trackerEntryStatus.url); + } } if ((errorHashesIt != m_errors.end()) && errorHashesIt->isEmpty()) -- 2.11.4.GIT