diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-21 17:13:45 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-21 17:13:45 +0100 |
commit | fb2d3d6b6a4b7be7fe0e771406e3acbf084d11f0 (patch) | |
tree | faeab171b16f8e37c04ff94d0b67f57de96be4cb | |
parent | Spare code cosmetics (diff) | |
download | pyload-fb2d3d6b6a4b7be7fe0e771406e3acbf084d11f0.tar.xz |
[UpdateManager] Fix https://github.com/pyload/pyload/issues/1272
-rw-r--r-- | module/plugins/hooks/UpdateManager.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index 7270bc34f..ca94548ea 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -28,7 +28,7 @@ def exists(path): class UpdateManager(Hook): __name__ = "UpdateManager" __type__ = "hook" - __version__ = "0.46" + __version__ = "0.47" __config__ = [("activated" , "bool" , "Activated" , True ), ("mode" , "pyLoad + plugins;plugins only", "Check updates for" , "pyLoad + plugins"), @@ -44,26 +44,26 @@ class UpdateManager(Hook): # event_list = ["pluginConfigChanged"] - SERVER_URL = "http://updatemanager.pyload.org" - VERSION = re.compile(r'__version__.*=.*("|\')([\d.]+)') + SERVER_URL = "http://updatemanager.pyload.org" + VERSION = re.compile(r'__version__.*=.*("|\')([\d.]+)') MIN_CHECK_INTERVAL = 3 * 60 * 60 #: 3 hours - # def pluginConfigChanged(self, plugin, name, value): - # if name == "interval": - # interval = value * 60 * 60 - # if self.MIN_CHECK_INTERVAL <= interval != self.interval: + def pluginConfigChanged(self, plugin, name, value): + if name == "interval": + interval = value * 60 * 60 + if self.MIN_CHECK_INTERVAL <= interval != self.interval: # self.core.scheduler.removeJob(self.cb) - # self.interval = interval - # self.initPeriodical() - # else: - # self.logDebug("Invalid interval value, kept current") - - # elif name == "reloadplugins": - # if self.cb2: - # self.core.scheduler.removeJob(self.cb2) - # if value is True and self.core.debug: - # self.periodical2() + self.interval = interval + self.initPeriodical() + else: + self.logDebug("Invalid interval value, kept current") + + elif name == "reloadplugins": + if self.cb2: + self.core.scheduler.removeJob(self.cb2) + if value is True and self.core.debug: + self.periodical2() def coreReady(self): |