diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-05 02:24:04 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-05 02:24:04 +0200 |
commit | 1609d320be17c87ff0c7640511c9ba911fdd862e (patch) | |
tree | e4e986a539e32682148ba3eaf25f4e0477dc073c /module | |
parent | [FilefactoryComFolder] Rewritten (diff) | |
download | pyload-1609d320be17c87ff0c7640511c9ba911fdd862e.tar.xz |
Fixed https://github.com/pyload/pyload/issues/671 + improved threading
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/UpdateManager.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index 8e8449a51..ce06612bd 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -14,7 +14,7 @@ from module.plugins.Hook import threaded, Expose, Hook class UpdateManager(Hook): __name__ = "UpdateManager" - __version__ = "0.25" + __version__ = "0.26" __description__ = """Check for updates""" __config__ = [("activated", "bool", "Activated", True), ("mode", "pyLoad + plugins;plugins only", "Check updates for", "pyLoad + plugins"), @@ -34,8 +34,7 @@ class UpdateManager(Hook): if name == "interval": interval = value * 60 * 60 if self.MIN_TIME <= interval != self.interval: - if self.cb: - self.core.scheduler.removeJob(self.cb) + self.core.scheduler.removeJob(self.cb) self.interval = interval self.initPeriodical() else: @@ -43,10 +42,11 @@ class UpdateManager(Hook): elif name == "reloadplugins": if self.cb2: self.core.scheduler.removeJob(self.cb2) - if value and self.core.debug: + if value == True and self.core.debug: self.periodical2() def coreReady(self): + self.pluginConfigChanged(self.__name__, "interval", self.getConfig("interval")) self.pluginConfigChanged(self.__name__, "reloadplugins", self.getConfig("reloadplugins")) def setup(self): @@ -89,7 +89,6 @@ class UpdateManager(Hook): return True if self.core.pluginManager.reloadPlugins(reloads) else False - @threaded def periodical(self): if not self.info["pyload"] and not (self.getConfig("nodebugupdate") and self.core.debug): self.updating = True @@ -108,6 +107,7 @@ class UpdateManager(Hook): return self.update(onlyplugin=True) @Expose + @threaded def update(self, onlyplugin=False): """ check for updates """ data = self.server_response() |