summaryrefslogtreecommitdiffstats
path: root/module/download_thread.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-22 16:38:05 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-22 16:38:05 +0200
commit872412242c1a6e7217649d9606e9207893513434 (patch)
treecb6516fb9874f175387aadd1e417259f9502c05a /module/download_thread.py
parentremove queue from thread list and implemented own method to get suited (diff)
downloadpyload-872412242c1a6e7217649d9606e9207893513434.tar.xz
fixed little bugs
Diffstat (limited to 'module/download_thread.py')
-rw-r--r--module/download_thread.py28
1 files changed, 13 insertions, 15 deletions
diff --git a/module/download_thread.py b/module/download_thread.py
index e8dbf64c0..7b6b0fe6d 100644
--- a/module/download_thread.py
+++ b/module/download_thread.py
@@ -94,26 +94,24 @@ class Download_Thread(threading.Thread):
status = pyfile.status
pyfile.prepareDownload()
- if not status.exists:
- return False
+ if status.exists:
- if status.want_reconnect:
- print "handle reconnect"
- return False
+ if status.want_reconnect:
+ print "handle reconnect"
- while (time() < status.waituntil):
- status.type = "waiting"
- sleep(1) #eventuell auf genaue zeit warten
+ while (time() < status.waituntil):
+ status.type = "waiting"
+ sleep(1) #eventuell auf genaue zeit warten
- status.type = "downloading"
- print status.url , status.filename
+ status.type = "downloading"
+ print status.url , status.filename
- try:
- pyfile.plugin.req.download(status.url, pyfile.download_folder + "/" + status.filename)
- status.type = "finished"
- except:
- status.type = "failed"
+ try:
+ pyfile.plugin.req.download(status.url, pyfile.download_folder + "/" + status.filename)
+ status.type = "finished"
+ except:
+ status.type = "failed"
self.parent.job_finished(pyfile)