summaryrefslogtreecommitdiffstats
path: root/module/PluginThread.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-08-12 14:22:29 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-08-12 14:22:29 +0200
commitdf95882117f287ef77abb1cb115e71576c1c2dab (patch)
tree1f4c14c8f372a536047692ee977be9b26514e212 /module/PluginThread.py
parentaccount fixes (diff)
downloadpyload-df95882117f287ef77abb1cb115e71576c1c2dab.tar.xz
unrar hook :D, account fix, other fixes
Diffstat (limited to 'module/PluginThread.py')
-rw-r--r--module/PluginThread.py12
1 files changed, 7 insertions, 5 deletions
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()