summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/UpdateManager.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/UpdateManager.py')
-rw-r--r--module/plugins/hooks/UpdateManager.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py
index 887aedbd1..df81ebbe7 100644
--- a/module/plugins/hooks/UpdateManager.py
+++ b/module/plugins/hooks/UpdateManager.py
@@ -34,14 +34,17 @@ class UpdateManager(Hook):
def setup(self):
self.interval = self.getConfig("interval") * 60
self.updated = False
+ self.reloaded = True
@threaded
def periodical(self):
update = self.checkForUpdate()
if not update:
self.checkPlugins()
- if self.updated:
+ if self.updated and not self.reloaded:
self.log.info(_("*** Plugins have been updated, please restart pyLoad ***"))
+ elif self.updated and self.reloaded:
+ self.log.info(_("Plugins updated and reloaded"))
else:
self.log.info(_("No plugin updates available"))
@@ -103,4 +106,7 @@ class UpdateManager(Hook):
f = open(join("userplugins", prefix, name), "wb")
f.write(content)
f.close()
- self.updated = True \ No newline at end of file
+ self.updated = True
+
+ self.reloaded = False
+ self.core.pluginManager.reloadPlugins() \ No newline at end of file