mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
Do not force_reannounce if 0 trackers.
This commit is contained in:
parent
eac95882d4
commit
b871ae8152
1 changed files with 7 additions and 5 deletions
|
@ -316,9 +316,10 @@ class TorrentManager:
|
||||||
|
|
||||||
def set_trackers(self, torrent_id, trackers):
|
def set_trackers(self, torrent_id, trackers):
|
||||||
"""Sets trackers"""
|
"""Sets trackers"""
|
||||||
if trackers == [] or trackers == None:
|
if trackers == None:
|
||||||
return
|
trackers = []
|
||||||
log.debug("Setting trackers for %s", torrent_id)
|
|
||||||
|
log.debug("Setting trackers for %s: %s", torrent_id, trackers)
|
||||||
tracker_list = []
|
tracker_list = []
|
||||||
|
|
||||||
for tracker in trackers:
|
for tracker in trackers:
|
||||||
|
@ -332,8 +333,9 @@ class TorrentManager:
|
||||||
log.debug("tier: %s tracker: %s", t.tier, t.url)
|
log.debug("tier: %s tracker: %s", t.tier, t.url)
|
||||||
# Set the tracker list in the torrent object
|
# Set the tracker list in the torrent object
|
||||||
self.torrents[torrent_id].trackers = trackers
|
self.torrents[torrent_id].trackers = trackers
|
||||||
# Force a reannounce
|
if len(trackers) > 0:
|
||||||
self.force_reannounce(torrent_id)
|
# Force a reannounce if there is at least 1 tracker
|
||||||
|
self.force_reannounce(torrent_id)
|
||||||
|
|
||||||
def force_reannounce(self, torrent_id):
|
def force_reannounce(self, torrent_id):
|
||||||
"""Force a tracker reannounce"""
|
"""Force a tracker reannounce"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue