Handle some torrent conflicts

PR #17576.
This commit is contained in:
Vladimir Golovnev
2022-08-23 07:47:20 +03:00
committed by GitHub
parent d173216941
commit 7527343629
9 changed files with 188 additions and 60 deletions

View File

@@ -536,7 +536,7 @@ void SyncController::maindataAction()
void SyncController::torrentPeersAction()
{
const auto id = BitTorrent::TorrentID::fromString(params()[u"hash"_qs]);
const BitTorrent::Torrent *torrent = BitTorrent::Session::instance()->findTorrent(id);
const BitTorrent::Torrent *torrent = BitTorrent::Session::instance()->getTorrent(id);
if (!torrent)
throw APIError(APIErrorType::NotFound);