From 99e8f71246735dc8a0daba3502a3cb84eb14c2bc Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Wed, 29 Aug 2007 07:08:16 +0000 Subject: [PATCH] edit trackers now persistent --- ChangeLog | 2 ++ src/interface.py | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index ca880b61c..adbde3ba7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ Deluge 0.5.5 (xx August 2007) + * Editing a torrent's tracker list is now persistent between sessions + * Email alerts in the Torrent Notification plugin * New wizard to aid first-time users with configuration * Persistence between sessions for Speed Limiter, Web Seed and Desired Ratio plugins diff --git a/src/interface.py b/src/interface.py index db2f289d3..606d86a91 100644 --- a/src/interface.py +++ b/src/interface.py @@ -448,6 +448,7 @@ window, please enter your password")) include_hidden_chars=False).strip() self.manager.replace_trackers(torrent, self.textlist) self.edit_window.destroy() + self.manager.unique_IDs[torrent].trackers = self.textlist def show_edit_tracker_dialog(self, list): self.textbuffer = gtk.TextBuffer(table=None) @@ -898,6 +899,12 @@ window, please enter your password")) for torrent in self.manager.get_queue(): unique_id = self.manager.get_torrent_unique_id(torrent) self.torrent_model_append(unique_id) + try: + if self.manager.unique_IDs[unique_id].trackers: + self.manager.replace_trackers(torrent, \ + self.manager.unique_IDs[unique_id].trackers) + except AttributeError: + pass for torrent_file in cmd_line_torrents: self.interactive_add_torrent(torrent_file) @@ -1476,6 +1483,10 @@ this torrent will be deleted!") + "") self.save_column_widths() self.save_window_settings() gtk.main_quit() + for torrent in self.manager.get_queue(): + unique_id = self.manager.get_torrent_unique_id(torrent) + trackerslist = self.manager.get_trackers(unique_id) + self.manager.unique_IDs[unique_id].trackers = trackerslist enabled_plugins = ':'.join(self.plugins.get_enabled_plugins()) self.config.set('enabled_plugins', enabled_plugins) self.config.save()