mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Fix cannot remove trackers via WebAPI
The backport commit c3c7f28bad
was insufficient.
Closes 22039.
PR #22071.
This commit is contained in:
parent
0188e11dd7
commit
35dce07c63
1 changed files with 7 additions and 1 deletions
|
@ -880,7 +880,13 @@ void TorrentsController::removeTrackersAction()
|
|||
if (!torrent)
|
||||
throw APIError(APIErrorType::NotFound);
|
||||
|
||||
const QStringList urls = params()[u"urls"_s].split(u'|');
|
||||
const QStringList urlsParam = params()[u"urls"_s].split(u'|', Qt::SkipEmptyParts);
|
||||
|
||||
QStringList urls;
|
||||
urls.reserve(urlsParam.size());
|
||||
for (const QString &urlStr : urlsParam)
|
||||
urls << QUrl::fromPercentEncoding(urlStr.toLatin1());
|
||||
|
||||
torrent->removeTrackers(urls);
|
||||
|
||||
if (!torrent->isStopped())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue