From bd4390b052f4400752c643512228f40fae4443a6 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Tue, 1 Jul 2025 07:53:44 -0700 Subject: [PATCH] Reannounce DHT when reannouncing all trackers This matches the behavior exhibited by `TrackerListWidget` when reannouncing to a torrent's complete tracker list. --- src/gui/transferlistwidget.cpp | 3 +++ src/webui/api/torrentscontroller.cpp | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/transferlistwidget.cpp b/src/gui/transferlistwidget.cpp index 6fb71bfaa..f78dd8481 100644 --- a/src/gui/transferlistwidget.cpp +++ b/src/gui/transferlistwidget.cpp @@ -649,7 +649,10 @@ void TransferListWidget::recheckSelectedTorrents() void TransferListWidget::reannounceSelectedTorrents() { for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents())) + { torrent->forceReannounce(); + torrent->forceDHTAnnounce(); + } } int TransferListWidget::visibleColumnsCount() const diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 9e9a4ebf6..26e65e828 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -1620,7 +1620,11 @@ void TorrentsController::reannounceAction() requireParams({u"hashes"_s}); const QStringList hashes {params()[u"hashes"_s].split(u'|')}; - applyToTorrents(hashes, [](BitTorrent::Torrent *const torrent) { torrent->forceReannounce(); }); + applyToTorrents(hashes, [](BitTorrent::Torrent *const torrent) + { + torrent->forceReannounce(); + torrent->forceDHTAnnounce(); + }); setResult(QString()); }