diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 12ddcddfb..3446fb8e1 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -795,6 +795,14 @@ void TorrentsController::recheckAction() applyToTorrents(hashes, [](BitTorrent::TorrentHandle *torrent) { torrent->forceRecheck(); }); } +void TorrentsController::reannounceAction() +{ + checkParams({"hashes"}); + + const QStringList hashes {params()["hashes"].split('|')}; + applyToTorrents(hashes, [](BitTorrent::TorrentHandle *torrent) { torrent->forceReannounce(); }); +} + void TorrentsController::setCategoryAction() { checkParams({"hashes", "category"}); diff --git a/src/webui/api/torrentscontroller.h b/src/webui/api/torrentscontroller.h index 03d870f93..0abaa30a3 100644 --- a/src/webui/api/torrentscontroller.h +++ b/src/webui/api/torrentscontroller.h @@ -49,6 +49,7 @@ private slots: void resumeAction(); void pauseAction(); void recheckAction(); + void reannounceAction(); void renameAction(); void setCategoryAction(); void createCategoryAction(); diff --git a/src/webui/www/private/index.html b/src/webui/www/private/index.html index ee31e38ba..3497b5882 100644 --- a/src/webui/www/private/index.html +++ b/src/webui/www/private/index.html @@ -127,6 +127,7 @@