diff options
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") |