mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
[Web UI] Fix empty trackers addition
This commit is contained in:
parent
647140c7c7
commit
62b803e268
2 changed files with 9 additions and 6 deletions
|
@ -359,8 +359,11 @@ void WebApplication::action_command_addTrackers()
|
|||
BitTorrent::TorrentHandle *const torrent = BitTorrent::Session::instance()->findTorrent(hash);
|
||||
if (torrent) {
|
||||
QList<BitTorrent::TrackerEntry> trackers;
|
||||
foreach (const QString &url, request().posts["urls"].split('\n'))
|
||||
trackers << url;
|
||||
foreach (QString url, request().posts["urls"].split('\n')) {
|
||||
url = url.trimmed();
|
||||
if (!url.isEmpty())
|
||||
trackers << url;
|
||||
}
|
||||
torrent->addTrackers(trackers);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue