summaryrefslogtreecommitdiffstats
path: root/module/threads/DownloadThread.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-24 15:41:13 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-24 15:41:13 +0200
commitfb145cf68c0178b9551eaae3213ec01be112bf76 (patch)
tree61d8dd381a831da4c34359b5e471e11d687f4746 /module/threads/DownloadThread.py
parentadded some animations, code for show/hiding items (diff)
downloadpyload-fb145cf68c0178b9551eaae3213ec01be112bf76.tar.xz
fixed some things, so downloads works again
Diffstat (limited to 'module/threads/DownloadThread.py')
-rw-r--r--module/threads/DownloadThread.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/module/threads/DownloadThread.py b/module/threads/DownloadThread.py
index 0269b0660..cf59c5639 100644
--- a/module/threads/DownloadThread.py
+++ b/module/threads/DownloadThread.py
@@ -38,7 +38,7 @@ class DownloadThread(BaseThread):
BaseThread.__init__(self, manager)
self.queue = Queue() # job queue
- self.active = False
+ self.active = None
self.start()
@@ -52,7 +52,7 @@ class DownloadThread(BaseThread):
pyfile = self.active
if self.active == "quit":
- self.active = False
+ self.active = None
self.m.threads.remove(self)
return True
@@ -212,11 +212,19 @@ class DownloadThread(BaseThread):
pyfile.finishIfDone()
self.core.files.save()
+ def getProgress(self):
+ if self.active:
+ return self.active.getProgressInfo()
+
def put(self, job):
"""assign a job to the thread"""
self.queue.put(job)
+ def clean(self, pyfile):
+ """ set thread inactive and release pyfile """
+ self.active = False
+ pyfile.release()
def stop(self):
"""stops the thread"""