From 218ef6ec665fac20928d293e950458960f36c633 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 16 Aug 2011 20:11:57 +0200 Subject: plugin unloading, closed #377, some fixes --- module/PluginThread.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'module/PluginThread.py') 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") -- cgit v1.2.3