Add WebUI Force Reannounce option

This commit is contained in:
Thomas Piccirello
2018-07-22 20:33:17 -04:00
parent 17405dfc10
commit cdad0dc7d3
5 changed files with 27 additions and 0 deletions

View File

@@ -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"});