summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-05-23 15:03:43 +0200
committerGravatar spoob <spoob@gmx.de> 2009-05-23 15:03:43 +0200
commitc2b11f2425eac63a4140a71ede91db22ae749c7c (patch)
tree0a242f46cd8b91435e2ffb208b4b857ba21d3e8b /module
parenttypo (diff)
downloadpyload-c2b11f2425eac63a4140a71ede91db22ae749c7c.tar.xz
youtube plugin added, nicer test output
Diffstat (limited to 'module')
-rw-r--r--module/Py_Load_File.py1
-rw-r--r--module/download_thread.py28
2 files changed, 14 insertions, 15 deletions
diff --git a/module/Py_Load_File.py b/module/Py_Load_File.py
index 8fb45c079..c4bf2b08c 100644
--- a/module/Py_Load_File.py
+++ b/module/Py_Load_File.py
@@ -16,7 +16,6 @@ class PyLoadFile:
self.download_folder = ""
self.status = Status(self)
-
def _get_my_plugin(self):
""" searches the right plugin for an url
"""
diff --git a/module/download_thread.py b/module/download_thread.py
index 7b6b0fe6d..31d449472 100644
--- a/module/download_thread.py
+++ b/module/download_thread.py
@@ -82,7 +82,7 @@ class Download_Thread(threading.Thread):
while (not self.shutdown):
if self.parent.py_load_files:
self.loadedPyFile = self.parent.get_job()
- if self.loadedPyFile:
+ if self.loadedPyFile:
self.download(self.loadedPyFile)
sleep(0.5)
if self.shutdown:
@@ -90,30 +90,30 @@ class Download_Thread(threading.Thread):
self.parent.remove_thread(self)
def download(self, py_load_file):
- pyfile = py_load_file
+ pyfile = py_load_file
status = pyfile.status
pyfile.prepareDownload()
- if status.exists:
+ if status.exists:
if status.want_reconnect:
print "handle reconnect"
while (time() < status.waituntil):
status.type = "waiting"
- sleep(1) #eventuell auf genaue zeit warten
+ sleep(1) #eventuell auf genaue zeit warten
- 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"
-
- self.parent.job_finished(pyfile)
+ 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"
+
+ self.parent.job_finished(pyfile)
#startet downloader
#urllib.urlretrieve(status.url, pyfile.download_folder + "/" + status.filename, status)