mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 05:38:06 -06:00
Merge pull request #17713 from Chocobo1/trackers
Revise 'Add trackers' dialog
This commit is contained in:
@@ -745,14 +745,8 @@ void TorrentsController::addTrackersAction()
|
||||
if (!torrent)
|
||||
throw APIError(APIErrorType::NotFound);
|
||||
|
||||
QVector<BitTorrent::TrackerEntry> trackers;
|
||||
for (const QString &urlStr : asConst(params()[u"urls"_qs].split(u'\n')))
|
||||
{
|
||||
const QUrl url {urlStr.trimmed()};
|
||||
if (url.isValid())
|
||||
trackers.append({url.toString()});
|
||||
}
|
||||
torrent->addTrackers(trackers);
|
||||
const QVector<BitTorrent::TrackerEntry> entries = BitTorrent::parseTrackerEntries(params()[u"urls"_qs]);
|
||||
torrent->addTrackers(entries);
|
||||
}
|
||||
|
||||
void TorrentsController::editTrackerAction()
|
||||
|
||||
Reference in New Issue
Block a user