diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-30 17:33:14 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-30 17:33:14 +0100 |
commit | 7c28259f92c2b3c608583ff128a5ae4134d4c48f (patch) | |
tree | 1cc8d9e95c38f51b0efaef927e0036b677355068 /module/download_thread.py | |
parent | signal slot stuff (diff) | |
download | pyload-7c28259f92c2b3c608583ff128a5ae4134d4c48f.tar.xz |
moved captcha stuff, extended serienjunkies, some other stuff
Diffstat (limited to 'module/download_thread.py')
-rw-r--r-- | module/download_thread.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/module/download_thread.py b/module/download_thread.py index 3c008d000..a07f4511f 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -66,6 +66,9 @@ class Checksum(Exception): def getFile(self): return self.file +class CaptchaError(Exception): + pass + class Download_Thread(threading.Thread): def __init__(self, parent): threading.Thread.__init__(self) @@ -93,8 +96,10 @@ class Download_Thread(threading.Thread): f = open("%s.info" % e.getFile(), "w") f.write("Checksum not matched!") f.close() + except CaptchaError: + self.loadedPyFile.status.type = "failed" + self.loadedPyFile.status.error = "Can't solve captcha" except Exception, e: - try: if self.parent.parent.config['general']['debug_mode']: traceback.print_exc() @@ -123,8 +128,11 @@ class Download_Thread(threading.Thread): pyfile.plugin.prepare(self) pyfile.plugin.req.set_timeout(self.parent.parent.config['general']['max_download_time']) - - status.type = "downloading" + + if pyfile.plugin.props["type"] == "container": + status.type = "decrypting" + else: + status.type = "downloading" location = join(pyfile.folder, status.filename) pyfile.plugin.proceed(status.url, location) |