mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 05:38:06 -06:00
Improve handling the case when torrent enters/leaves trackerless state
PR #19658.
This commit is contained in:
committed by
GitHub
parent
43e9403a4c
commit
16111496ca
@@ -484,7 +484,6 @@ namespace BitTorrent
|
||||
void torrentTagAdded(Torrent *torrent, const QString &tag);
|
||||
void torrentTagRemoved(Torrent *torrent, const QString &tag);
|
||||
void trackerError(Torrent *torrent, const QString &tracker);
|
||||
void trackerlessStateChanged(Torrent *torrent, bool trackerless);
|
||||
void trackersAdded(Torrent *torrent, const QVector<TrackerEntry> &trackers);
|
||||
void trackersChanged(Torrent *torrent);
|
||||
void trackersRemoved(Torrent *torrent, const QStringList &trackers);
|
||||
|
||||
@@ -4815,8 +4815,6 @@ void SessionImpl::handleTorrentTrackersAdded(TorrentImpl *const torrent, const Q
|
||||
for (const TrackerEntry &newTracker : newTrackers)
|
||||
LogMsg(tr("Added tracker to torrent. Torrent: \"%1\". Tracker: \"%2\"").arg(torrent->name(), newTracker.url));
|
||||
emit trackersAdded(torrent, newTrackers);
|
||||
if (torrent->trackers().size() == newTrackers.size())
|
||||
emit trackerlessStateChanged(torrent, false);
|
||||
emit trackersChanged(torrent);
|
||||
}
|
||||
|
||||
@@ -4825,8 +4823,6 @@ void SessionImpl::handleTorrentTrackersRemoved(TorrentImpl *const torrent, const
|
||||
for (const QString &deletedTracker : deletedTrackers)
|
||||
LogMsg(tr("Removed tracker from torrent. Torrent: \"%1\". Tracker: \"%2\"").arg(torrent->name(), deletedTracker));
|
||||
emit trackersRemoved(torrent, deletedTrackers);
|
||||
if (torrent->trackers().isEmpty())
|
||||
emit trackerlessStateChanged(torrent, true);
|
||||
emit trackersChanged(torrent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user