diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-08-16 20:11:57 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-08-16 20:11:57 +0200 |
commit | 218ef6ec665fac20928d293e950458960f36c633 (patch) | |
tree | b2d279d6e45ac1b556db5df215ebb464333a0891 /module/PluginThread.py | |
parent | updated thrift, --clean method, youtube fix closed #379 (diff) | |
download | pyload-218ef6ec665fac20928d293e950458960f36c633.tar.xz |
plugin unloading, closed #377, some fixes
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r-- | module/PluginThread.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index be29a680e..c5b85a043 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -198,6 +198,7 @@ class DownloadThread(PluginThread): self.m.log.warning(_("Download failed: %(name)s | %(msg)s") % {"name": pyfile.name, "msg": msg}) pyfile.error = msg + self.m.core.hookManager.downloadFailed(pyfile) self.clean(pyfile) continue @@ -238,6 +239,8 @@ class DownloadThread(PluginThread): print_exc() self.writeDebugReport(pyfile) + self.m.core.hookManager.downloadFailed(pyfile) + self.clean(pyfile) continue @@ -266,12 +269,13 @@ class DownloadThread(PluginThread): print_exc() self.writeDebugReport(pyfile) + self.m.core.hookManager.downloadFailed(pyfile) self.clean(pyfile) continue finally: self.m.core.files.save() - self.m.core.files.checkAllLinksProcessed() + pyfile.checkIfProcessed() exc_clear() self.m.log.info(_("Download finished: %s") % pyfile.name) @@ -285,12 +289,12 @@ class DownloadThread(PluginThread): pyfile.finishIfDone() self.m.core.files.save() - #---------------------------------------------------------------------- + def put(self, job): """assing job to thread""" self.queue.put(job) - #---------------------------------------------------------------------- + def stop(self): """stops the thread""" self.put("quit") |