mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-16 13:26:33 +00:00
move pause code in blocklist plugin
This commit is contained in:
parent
dcfb14d7e5
commit
e4e4ded874
@ -54,12 +54,6 @@ class BlocklistImport:
|
|||||||
self.gtkconf = GTKConfig(self)
|
self.gtkconf = GTKConfig(self)
|
||||||
self.gtkprog = GTKProgress(self)
|
self.gtkprog = GTKProgress(self)
|
||||||
self.nimported = 0
|
self.nimported = 0
|
||||||
# Stop all torrents
|
|
||||||
self.paused_or_not = {}
|
|
||||||
for unique_ID in self.core.unique_IDs:
|
|
||||||
self.paused_or_not[unique_ID] = self.core.is_user_paused(unique_ID)
|
|
||||||
if not self.paused_or_not[unique_ID]:
|
|
||||||
self.core.set_user_pause(unique_ID, True, enforce_queue=False)
|
|
||||||
|
|
||||||
self.blockfile = deluge.common.CONFIG_DIR + "/blocklist.cache"
|
self.blockfile = deluge.common.CONFIG_DIR + "/blocklist.cache"
|
||||||
|
|
||||||
@ -77,6 +71,13 @@ class BlocklistImport:
|
|||||||
self.gtkprog.download_prog(curr/incs)
|
self.gtkprog.download_prog(curr/incs)
|
||||||
|
|
||||||
def loadlist(self, fetch=False):
|
def loadlist(self, fetch=False):
|
||||||
|
# Stop all torrents
|
||||||
|
self.paused_or_not = {}
|
||||||
|
for unique_ID in self.core.unique_IDs:
|
||||||
|
self.paused_or_not[unique_ID] = self.core.is_user_paused(unique_ID)
|
||||||
|
if not self.paused_or_not[unique_ID]:
|
||||||
|
self.core.set_user_pause(unique_ID, True, enforce_queue=False)
|
||||||
|
|
||||||
self.gtkprog.start()
|
self.gtkprog.start()
|
||||||
|
|
||||||
# Attempt initial import
|
# Attempt initial import
|
||||||
|
Loading…
x
Reference in New Issue
Block a user