mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 04:54:23 +00:00
Do not force_reannounce if 0 trackers.
This commit is contained in:
parent
eac95882d4
commit
b871ae8152
@ -316,9 +316,10 @@ class TorrentManager:
|
||||
|
||||
def set_trackers(self, torrent_id, trackers):
|
||||
"""Sets trackers"""
|
||||
if trackers == [] or trackers == None:
|
||||
return
|
||||
log.debug("Setting trackers for %s", torrent_id)
|
||||
if trackers == None:
|
||||
trackers = []
|
||||
|
||||
log.debug("Setting trackers for %s: %s", torrent_id, trackers)
|
||||
tracker_list = []
|
||||
|
||||
for tracker in trackers:
|
||||
@ -332,7 +333,8 @@ class TorrentManager:
|
||||
log.debug("tier: %s tracker: %s", t.tier, t.url)
|
||||
# Set the tracker list in the torrent object
|
||||
self.torrents[torrent_id].trackers = trackers
|
||||
# Force a reannounce
|
||||
if len(trackers) > 0:
|
||||
# Force a reannounce if there is at least 1 tracker
|
||||
self.force_reannounce(torrent_id)
|
||||
|
||||
def force_reannounce(self, torrent_id):
|
||||
|
Loading…
x
Reference in New Issue
Block a user