From df95882117f287ef77abb1cb115e71576c1c2dab Mon Sep 17 00:00:00 2001 From: mkaay Date: Thu, 12 Aug 2010 14:22:29 +0200 Subject: unrar hook :D, account fix, other fixes --- module/PluginThread.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'module/PluginThread.py') diff --git a/module/PluginThread.py b/module/PluginThread.py index f6707a908..c666e7875 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -28,6 +28,7 @@ from module.plugins.Plugin import Fail from module.plugins.Plugin import Reconnect from module.plugins.Plugin import Retry from pycurl import error +from module.FileDatabase import PyFile ######################################################################## class PluginThread(Thread): @@ -255,8 +256,9 @@ class HookThread(PluginThread): self.active = pyfile m.localThreads.append(self) - - pyfile.setStatus("processing") + + if isinstance(pyfile, PyFile): + pyfile.setStatus("processing") self.start() @@ -265,8 +267,8 @@ class HookThread(PluginThread): self.m.localThreads.remove(self) - self.active.finishIfDone() - + if isinstance(self.active, PyFile): + self.active.finishIfDone() ######################################################################## class InfoThread(PluginThread): @@ -303,4 +305,4 @@ class InfoThread(PluginThread): self.m.core.log.debug("Finished Info Fetching for %s" % pluginname) - self.m.core.files.save() \ No newline at end of file + self.m.core.files.save() -- cgit v1.2.3