summaryrefslogtreecommitdiffstats
path: root/module/threads/ThreadManager.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-01 13:36:59 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-01 13:36:59 +0100
commit35742c2cb023ac49ab3056752d2040cdb030cc2b (patch)
treed0f22f591b2b81ab24a982a44820a3d86ba5eea3 /module/threads/ThreadManager.py
parentmissing import (diff)
downloadpyload-35742c2cb023ac49ab3056752d2040cdb030cc2b.tar.xz
Happy new Year !
Diffstat (limited to 'module/threads/ThreadManager.py')
-rw-r--r--module/threads/ThreadManager.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/module/threads/ThreadManager.py b/module/threads/ThreadManager.py
index c32286eb9..612da2536 100644
--- a/module/threads/ThreadManager.py
+++ b/module/threads/ThreadManager.py
@@ -71,7 +71,7 @@ class ThreadManager:
pycurl.global_init(pycurl.GLOBAL_DEFAULT)
- for i in range(0, self.core.config.get("download", "max_downloads")):
+ for i in range(self.core.config.get("download", "max_downloads")):
self.createThread()
@@ -84,25 +84,24 @@ class ThreadManager:
def createInfoThread(self, data, pid):
""" start a thread whichs fetches online status and other infos """
self.timestamp = time() + 5 * 60
-
- InfoThread(self, data, pid)
+ if data: InfoThread(self, data, pid)
@lock
- def createResultThread(self, data, add=False):
+ def createResultThread(self, data):
""" creates a thread to fetch online status, returns result id """
self.timestamp = time() + 5 * 60
rid = self.resultIDs
self.resultIDs += 1
- InfoThread(self, data, rid=rid, add=add)
+ InfoThread(self, data, rid=rid)
return rid
@lock
def createDecryptThread(self, data, pid):
""" Start decrypting of entered data, all links in one package are accumulated to one thread."""
- DecrypterThread(self, data, pid)
+ if data: DecrypterThread(self, data, pid)
@lock