diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-28 00:21:26 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-28 00:21:26 +0200 |
commit | 2b484935a076b0323bfcfeaac2935247ba2bfd35 (patch) | |
tree | 1cf51fe6a1f9ab4819f70f56808f02fffbb5c3f4 /module/plugins | |
parent | [GoogledriveCom][MediafireCom] Cleanup (diff) | |
download | pyload-2b484935a076b0323bfcfeaac2935247ba2bfd35.tar.xz |
[UpdateManager] Fix https://github.com/pyload/pyload/issues/1432
Diffstat (limited to 'module/plugins')
-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 ceba8e792..98d602226 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -29,7 +29,7 @@ def exists(path): class UpdateManager(Hook): __name__ = "UpdateManager" __type__ = "hook" - __version__ = "0.51" + __version__ = "0.52" __config__ = [("activated" , "bool", "Activated" , True ), ("checkinterval", "int" , "Check interval in hours" , 8 ), @@ -52,7 +52,10 @@ class UpdateManager(Hook): def coreReady(self): if self.checkonstart: + self.core.api.pauseServer() self.update() + if self.do_restart is False: + self.core.api.unpauseServer() self.initPeriodical() @@ -136,16 +139,13 @@ class UpdateManager(Hook): def update(self): """ check for updates """ - self.core.api.pauseServer() - if self._update() is 2 and self.getConfig('autorestart'): if not self.core.api.statusDownloads(): self.core.api.restart() else: self.do_restart = True self.logWarning(_("Downloads are active, will restart once the download is done")) - else: - self.core.api.unpauseServer() + self.core.api.pauseServer() def _update(self): |