stefantalpalaru / deluge-default-trackers

Deluge plugin for adding default trackers to all the new torrents
GNU General Public License v3.0
141 stars 23 forks source link

Have a Question if I want to replace the tracker on the list, not just append some. #16

Closed YihaoJW closed 7 years ago

YihaoJW commented 7 years ago

Have a Question if I want to replace the tracker on the list, not just attend some.

in core.py got_new_trackers = False for new_tracker in self.config["trackers"]: if new_tracker["url"] not in existing_urls: got_new_trackers = True trackers.append({ "tier": 0, "url": str(new_tracker["url"]), }) If I want fully replace the tracker not just append,(deleted the origin tracker in the torrent, and add some new tracker), then how to modify. Thanks

stefantalpalaru commented 7 years ago

Try replacing trackers = list(torrent.get_status(["trackers"])["trackers"]) with trackers = [].