mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Skip reannounce if torrent is stopped
This matches the behavior exhibited elsewhere, but was not consistently applied.
This commit is contained in:
parent
d3c432ee92
commit
ee4baa39c4
2 changed files with 11 additions and 5 deletions
|
@ -650,8 +650,11 @@ void TransferListWidget::reannounceSelectedTorrents()
|
|||
{
|
||||
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
||||
{
|
||||
torrent->forceReannounce();
|
||||
torrent->forceDHTAnnounce();
|
||||
if (!torrent->isStopped())
|
||||
{
|
||||
torrent->forceReannounce();
|
||||
torrent->forceDHTAnnounce();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1621,9 +1621,12 @@ void TorrentsController::reannounceAction()
|
|||
const QStringList hashes {params()[u"hashes"_s].split(u'|')};
|
||||
applyToTorrents(hashes, [](BitTorrent::Torrent *const torrent)
|
||||
{
|
||||
torrent->forceReannounce();
|
||||
torrent->forceDHTAnnounce();
|
||||
});
|
||||
if (!torrent->isStopped())
|
||||
{
|
||||
torrent->forceReannounce();
|
||||
torrent->forceDHTAnnounce();
|
||||
}
|
||||
});
|
||||
|
||||
setResult(QString());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue