mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
[Web UI] Fix empty trackers addition
This commit is contained in:
parent
a088657619
commit
1ee91ddb13
2 changed files with 11 additions and 7 deletions
|
@ -362,9 +362,13 @@ void WebApplication::action_command_addTrackers()
|
|||
QString hash = request().posts["hash"];
|
||||
|
||||
if (!hash.isEmpty()) {
|
||||
QString urls = request().posts["urls"];
|
||||
QStringList list = urls.split('\n');
|
||||
QBtSession::instance()->addTrackersAndUrlSeeds(hash, list, QStringList());
|
||||
QStringList trackers;
|
||||
foreach (QString url, request().posts["urls"].split('\n')) {
|
||||
url = url.trimmed();
|
||||
if (!url.isEmpty())
|
||||
trackers << url;
|
||||
}
|
||||
QBtSession::instance()->addTrackersAndUrlSeeds(hash, trackers, QStringList());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
<table class="torrentTable" cellpadding="0" cellspacing="0" style="width: 100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>QBT_TR(URL)QBT_TR <img src="theme/list-add" id="addTrackersPlus"/></th>
|
||||
<th style="width: 250px;">QBT_TR(Status)QBT_TR</th>
|
||||
<th style="width: 150px;">QBT_TR(Peers)QBT_TR</th>
|
||||
<th style="width: 200px;">QBT_TR(Message)QBT_TR</th>
|
||||
<th style="width: 30%;">QBT_TR(URL)QBT_TR <img src="theme/list-add" id="addTrackersPlus"/></th>
|
||||
<th style="width: 10%;">QBT_TR(Status)QBT_TR</th>
|
||||
<th style="width: 10%;">QBT_TR(Peers)QBT_TR</th>
|
||||
<th style="width: 50%;">QBT_TR(Message)QBT_TR</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="trackersTable"></tbody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue