mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Don't re-announce to trackers when torrent is paused. Closes #1310.
Conflicts: src/properties/trackerlist.cpp
This commit is contained in:
parent
49fa853dde
commit
5fadb0d53e
1 changed files with 16 additions and 8 deletions
|
@ -140,7 +140,8 @@ void TrackerList::moveSelectionUp() {
|
||||||
}
|
}
|
||||||
h.replace_trackers(trackers);
|
h.replace_trackers(trackers);
|
||||||
// Reannounce
|
// Reannounce
|
||||||
h.force_reannounce();
|
if (!h.is_paused())
|
||||||
|
h.force_reannounce();
|
||||||
loadTrackers();
|
loadTrackers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +178,8 @@ void TrackerList::moveSelectionDown() {
|
||||||
}
|
}
|
||||||
h.replace_trackers(trackers);
|
h.replace_trackers(trackers);
|
||||||
// Reannounce
|
// Reannounce
|
||||||
h.force_reannounce();
|
if (!h.is_paused())
|
||||||
|
h.force_reannounce();
|
||||||
loadTrackers();
|
loadTrackers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,7 +304,8 @@ void TrackerList::askForTrackers() {
|
||||||
h.add_tracker(url);
|
h.add_tracker(url);
|
||||||
}
|
}
|
||||||
// Reannounce to new trackers
|
// Reannounce to new trackers
|
||||||
h.force_reannounce();
|
if (!h.is_paused())
|
||||||
|
h.force_reannounce();
|
||||||
// Reload tracker list
|
// Reload tracker list
|
||||||
loadTrackers();
|
loadTrackers();
|
||||||
}
|
}
|
||||||
|
@ -348,7 +351,8 @@ void TrackerList::deleteSelectedTrackers() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
h.replace_trackers(remaining_trackers);
|
h.replace_trackers(remaining_trackers);
|
||||||
h.force_reannounce();
|
if (!h.is_paused())
|
||||||
|
h.force_reannounce();
|
||||||
// Reload Trackers
|
// Reload Trackers
|
||||||
loadTrackers();
|
loadTrackers();
|
||||||
}
|
}
|
||||||
|
@ -396,8 +400,10 @@ void TrackerList::editSelectedTracker() {
|
||||||
}
|
}
|
||||||
|
|
||||||
h.replace_trackers(trackers);
|
h.replace_trackers(trackers);
|
||||||
h.force_reannounce();
|
if (!h.is_paused()) {
|
||||||
h.force_dht_announce();
|
h.force_reannounce();
|
||||||
|
h.force_dht_announce();
|
||||||
|
}
|
||||||
} catch(invalid_handle&) {
|
} catch(invalid_handle&) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -420,8 +426,10 @@ void TrackerList::showTrackerListMenu(QPoint) {
|
||||||
copyAct = menu.addAction(IconProvider::instance()->getIcon("edit-copy"), tr("Copy tracker url"));
|
copyAct = menu.addAction(IconProvider::instance()->getIcon("edit-copy"), tr("Copy tracker url"));
|
||||||
editAct = menu.addAction(IconProvider::instance()->getIcon("edit-rename"),tr("Edit selected tracker URL"));
|
editAct = menu.addAction(IconProvider::instance()->getIcon("edit-rename"),tr("Edit selected tracker URL"));
|
||||||
}
|
}
|
||||||
menu.addSeparator();
|
if (!h.is_paused()) {
|
||||||
QAction *reannounceAct = menu.addAction(IconProvider::instance()->getIcon("view-refresh"), tr("Force reannounce to all trackers"));
|
menu.addSeparator();
|
||||||
|
reannounceAct = menu.addAction(IconProvider::instance()->getIcon("view-refresh"), tr("Force reannounce to all trackers"));
|
||||||
|
}
|
||||||
QAction *act = menu.exec(QCursor::pos());
|
QAction *act = menu.exec(QCursor::pos());
|
||||||
if (act == 0) return;
|
if (act == 0) return;
|
||||||
if (act == addAct) {
|
if (act == addAct) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue