mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 22:33:34 -07:00
fix: do not include sticky trackers in getTrackers
This commit is contained in:
parent
eceb66ac04
commit
5d903cab4f
1 changed files with 9 additions and 2 deletions
|
@ -251,7 +251,7 @@ namespace
|
||||||
|
|
||||||
QJsonArray getTrackers(const BitTorrent::Torrent *const torrent)
|
QJsonArray getTrackers(const BitTorrent::Torrent *const torrent)
|
||||||
{
|
{
|
||||||
QJsonArray trackerList = getStickyTrackers(torrent);
|
QJsonArray trackerList;
|
||||||
|
|
||||||
for (const BitTorrent::TrackerEntryStatus &tracker : asConst(torrent->trackers()))
|
for (const BitTorrent::TrackerEntryStatus &tracker : asConst(torrent->trackers()))
|
||||||
{
|
{
|
||||||
|
@ -566,7 +566,14 @@ void TorrentsController::trackersAction()
|
||||||
if (!torrent)
|
if (!torrent)
|
||||||
throw APIError(APIErrorType::NotFound);
|
throw APIError(APIErrorType::NotFound);
|
||||||
|
|
||||||
setResult(getTrackers(torrent));
|
QJsonArray trackersList = getStickyTrackers(torrent);
|
||||||
|
QJsonArray trackers = getTrackers(torrent);
|
||||||
|
|
||||||
|
// merge QJsonArray
|
||||||
|
for (auto &&tracker : trackers)
|
||||||
|
trackersList.append(std::move(tracker));
|
||||||
|
|
||||||
|
setResult(trackersList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the web seeds for a torrent in JSON format.
|
// Returns the web seeds for a torrent in JSON format.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue