diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-16 12:08:28 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-16 12:08:28 +0200 |
commit | 890d9efcfe3b15e3da518de9b2cfe3f2e25744ff (patch) | |
tree | b1b180e139a084dea796c0ab8e88e4291f3a9fa3 /module/FileDatabase.py | |
parent | fileserve lookinto (diff) | |
download | pyload-890d9efcfe3b15e3da518de9b2cfe3f2e25744ff.tar.xz |
closed #131
Diffstat (limited to 'module/FileDatabase.py')
-rw-r--r-- | module/FileDatabase.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py index 80613db30..373e4e571 100644 --- a/module/FileDatabase.py +++ b/module/FileDatabase.py @@ -936,9 +936,10 @@ class PyFile(): def initPlugin(self): """ inits plugin instance """ - self.pluginmodule = self.m.core.pluginManager.getPlugin(self.pluginname) - self.pluginclass = getattr(self.pluginmodule, self.pluginname) - self.plugin = self.pluginclass(self) + if not self.plugin: + self.pluginmodule = self.m.core.pluginManager.getPlugin(self.pluginname) + self.pluginclass = getattr(self.pluginmodule, self.pluginname) + self.plugin = self.pluginclass(self) def package(self): @@ -959,6 +960,8 @@ class PyFile(): def release(self): """sync and remove from cache""" self.sync() + if hasattr(self, "plugin"): + del self.plugin self.m.releaseLink(self.id) def delete(self): |