mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Revise 'Add trackers' dialog
* Now it allow user to add tracker to different tier. * The downloaded trackers are now displayed as is (without modifying). * Now the dialog remember dialog size and last used URL. Closes #17692.
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