mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -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
|
@ -649,11 +649,14 @@ void TransferListWidget::recheckSelectedTorrents()
|
||||||
void TransferListWidget::reannounceSelectedTorrents()
|
void TransferListWidget::reannounceSelectedTorrents()
|
||||||
{
|
{
|
||||||
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
|
||||||
|
{
|
||||||
|
if (!torrent->isStopped())
|
||||||
{
|
{
|
||||||
torrent->forceReannounce();
|
torrent->forceReannounce();
|
||||||
torrent->forceDHTAnnounce();
|
torrent->forceDHTAnnounce();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int TransferListWidget::visibleColumnsCount() const
|
int TransferListWidget::visibleColumnsCount() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -1620,9 +1620,12 @@ void TorrentsController::reannounceAction()
|
||||||
|
|
||||||
const QStringList hashes {params()[u"hashes"_s].split(u'|')};
|
const QStringList hashes {params()[u"hashes"_s].split(u'|')};
|
||||||
applyToTorrents(hashes, [](BitTorrent::Torrent *const torrent)
|
applyToTorrents(hashes, [](BitTorrent::Torrent *const torrent)
|
||||||
|
{
|
||||||
|
if (!torrent->isStopped())
|
||||||
{
|
{
|
||||||
torrent->forceReannounce();
|
torrent->forceReannounce();
|
||||||
torrent->forceDHTAnnounce();
|
torrent->forceDHTAnnounce();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setResult(QString());
|
setResult(QString());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue