mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Update the UI when trackers or Url seeds are added either via the WebUI or via merging duplicate torrents.
This commit is contained in:
parent
a85b6df314
commit
96d7bfb4ad
12 changed files with 145 additions and 124 deletions
|
@ -354,17 +354,9 @@ void WebApplication::action_command_addTrackers()
|
|||
QString hash = request().posts["hash"];
|
||||
|
||||
if (!hash.isEmpty()) {
|
||||
QTorrentHandle h = QBtSession::instance()->getTorrentHandle(hash);
|
||||
|
||||
if (h.is_valid() && h.has_metadata()) {
|
||||
QString urls = request().posts["urls"];
|
||||
QStringList list = urls.split('\n');
|
||||
|
||||
foreach (const QString& url, list) {
|
||||
announce_entry e(url.toStdString());
|
||||
h.add_tracker(e);
|
||||
}
|
||||
}
|
||||
QString urls = request().posts["urls"];
|
||||
QStringList list = urls.split('\n');
|
||||
QBtSession::instance()->addTrackersAndUrlSeeds(hash, list, QStringList());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue