summaryrefslogtreecommitdiffstats
path: root/module/download_thread.py
diff options
context:
space:
mode:
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)