From 6bcd0ca604e024679e48cecb5d9bb3488e7a1ed7 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 28 Aug 2007 23:23:05 +0000 Subject: [PATCH] webseed plugin persistence --- plugins/WebSeed/__init__.py | 8 ++++++++ src/core.py | 1 + 2 files changed, 9 insertions(+) diff --git a/plugins/WebSeed/__init__.py b/plugins/WebSeed/__init__.py index 343296e5b..0427e6238 100644 --- a/plugins/WebSeed/__init__.py +++ b/plugins/WebSeed/__init__.py @@ -53,6 +53,14 @@ class webseedMenu: self.menuitem.connect("activate", self.webseed_clicked) self.interface.torrent_menu.append(self.menuitem) self.menuitem.show_all() + for torrent in self.core.get_queue(): + unique_ID = self.core.get_torrent_unique_id(torrent) + try: + if self.core.unique_IDs[unique_ID].webseed_urls: + for urls in self.core.unique_IDs[unique_ID].webseed_urls: + self.core.add_url_seed(unique_ID, urls) + except AttributeError: + pass def update(self): pass diff --git a/src/core.py b/src/core.py index 784f4d198..510d17258 100644 --- a/src/core.py +++ b/src/core.py @@ -163,6 +163,7 @@ class torrent_info: self.uploaded_memory = 0 self.upload_rate_limit = 0 self.download_rate_limit = 0 + self.webseed_urls = [] self.delete_me = False # set this to true, to delete it on next sync