mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-07 03:16:48 +08: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
@ -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…
Reference in New Issue
Block a user