mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 06:58:42 +00:00
This commit is contained in:
parent
2bac676de7
commit
4cca79c764
1 changed files with 31 additions and 17 deletions
|
@ -943,6 +943,32 @@ window, please enter your password"))
|
|||
self.load_tabs_order()
|
||||
#now we load blocklist plugin separately since it takes much longer
|
||||
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():
|
||||
unique_id = self.manager.get_torrent_unique_id(torrent)
|
||||
try:
|
||||
|
@ -960,20 +986,8 @@ window, please enter your password"))
|
|||
pass
|
||||
except AttributeError:
|
||||
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):
|
||||
enable_plugins = self.config.get('enabled_plugins').split(':')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue