summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-30 19:31:10 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-01 18:22:58 +0100
commit7e44687839660802bf35bd14a82551bae424f7ba (patch)
tree4b3e33d4ac6bb1e8ac8f0f70e80a241042f01e92 /module/plugins
parentMerge pull request #821 from Guidobelix/SafesharingEu (diff)
downloadpyload-7e44687839660802bf35bd14a82551bae424f7ba.tar.xz
[UpdateManager] Option autorestart
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hooks/UpdateManager.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py
index 3fda0b5e8..9c26cf5d9 100644
--- a/module/plugins/hooks/UpdateManager.py
+++ b/module/plugins/hooks/UpdateManager.py
@@ -14,13 +14,14 @@ from module.utils import save_join
class UpdateManager(Hook):
__name__ = "UpdateManager"
__type__ = "hook"
- __version__ = "0.39"
+ __version__ = "0.40"
- __config__ = [("activated", "bool", "Activated", True),
- ("mode", "pyLoad + plugins;plugins only", "Check updates for", "pyLoad + plugins"),
- ("interval", "int", "Check interval in hours", 8),
- ("reloadplugins", "bool", "Monitor plugins for code changes (debug mode only)", True),
- ("nodebugupdate", "bool", "Don't check for updates in debug mode", True)]
+ __config__ = [("activated" , "bool" , "Activated" , True ),
+ ("mode" , "pyLoad + plugins;plugins only", "Check updates for" , "pyLoad + plugins"),
+ ("interval" , "int" , "Check interval in hours" , 8 ),
+ ("autorestart" , "bool" , "Automatically restart pyLoad when required" , True ),
+ ("reloadplugins", "bool" , "Monitor plugins for code changes in debug mode", True ),
+ ("nodebugupdate", "bool" , "Don't check for updates in debug mode" , True )]
__description__ = """ Check for updates """
__license__ = "GPLv3"
@@ -123,7 +124,7 @@ class UpdateManager(Hook):
status = self.update(onlyplugin=self.getConfig("mode") == "plugins only")
- if status == 2:
+ if status is 2 and self.getConfig("autorestart"):
self.core.api.restart()
else:
self.updating = False