Handle torrent "paused" state at application level

This commit is contained in:
Vladimir Golovnev (Glassez) 2020-04-19 16:12:50 +03:00
commit 85bd0feee0
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
10 changed files with 157 additions and 146 deletions

View file

@ -888,7 +888,10 @@ void TorrentsController::setForceStartAction()
const bool value {parseBool(params()["value"], false)};
const QStringList hashes {params()["hashes"].split('|')};
applyToTorrents(hashes, [value](BitTorrent::TorrentHandle *const torrent) { torrent->resume(value); });
applyToTorrents(hashes, [value](BitTorrent::TorrentHandle *const torrent)
{
torrent->resume(value ? BitTorrent::TorrentOperatingMode::Forced : BitTorrent::TorrentOperatingMode::AutoManaged);
});
}
void TorrentsController::deleteAction()