From 890d9efcfe3b15e3da518de9b2cfe3f2e25744ff Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 16 Oct 2010 12:08:28 +0200 Subject: closed #131 --- module/FileDatabase.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'module/FileDatabase.py') 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): -- cgit v1.2.3