This commit is contained in:
Marcos Pinto 2007-10-29 00:16:42 +00:00
parent 2bac676de7
commit 4cca79c764

View File

@ -943,6 +943,32 @@ window, please enter your password"))
self.load_tabs_order() self.load_tabs_order()
#now we load blocklist plugin separately since it takes much longer #now we load blocklist plugin separately since it takes much longer
enable_plugins = self.config.get('enabled_plugins').split(':') enable_plugins = self.config.get('enabled_plugins').split(':')
self.initial_reload_trackers(self.manager)
if "Blocklist Importer" in enable_plugins:
try:
self.plugins.enable_plugin("Blocklist Importer")
except KeyError:
pass
try:
gobject.threads_init()
gtk.gdk.threads_enter()
gtk.main()
gtk.gdk.threads_leave()
except KeyboardInterrupt:
self.manager.quit()
def initial_reload_trackers(self, manager):
import threading
class ReloadTrackers(threading.Thread):
def __init__(self, manager):
threading.Thread.__init__(self)
self.manager = manager
def run(self):
import time
time.sleep(3)
for torrent in self.manager.get_queue(): for torrent in self.manager.get_queue():
unique_id = self.manager.get_torrent_unique_id(torrent) unique_id = self.manager.get_torrent_unique_id(torrent)
try: try:
@ -960,20 +986,8 @@ window, please enter your password"))
pass pass
except AttributeError: except AttributeError:
pass pass
ReloadTrackers(manager).start()
if "Blocklist Importer" in enable_plugins:
try:
self.plugins.enable_plugin("Blocklist Importer")
except KeyError:
pass
try:
gobject.threads_init()
gtk.gdk.threads_enter()
gtk.main()
gtk.gdk.threads_leave()
except KeyboardInterrupt:
self.manager.quit()
def load_plugins(self): def load_plugins(self):
enable_plugins = self.config.get('enabled_plugins').split(':') enable_plugins = self.config.get('enabled_plugins').split(':')