diff options
Diffstat (limited to 'pyload/plugin/addon/UpdateManager.py')
-rw-r--r-- | pyload/plugin/addon/UpdateManager.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pyload/plugin/addon/UpdateManager.py b/pyload/plugin/addon/UpdateManager.py index 023884029..c7c7ec047 100644 --- a/pyload/plugin/addon/UpdateManager.py +++ b/pyload/plugin/addon/UpdateManager.py @@ -50,12 +50,14 @@ class UpdateManager(Addon): SERVER_URL = "http://updatemanager.pyload.org" if release_status == 5 else None MIN_CHECK_INTERVAL = 3 * 60 * 60 #: 3 hours + def activate(self): if self.checkonstart: self.update() self.initPeriodical() + def setup(self): self.interval = 10 self.info = {'pyload': False, 'version': None, 'plugins': False, 'last_check': time.time()} @@ -67,6 +69,7 @@ class UpdateManager(Addon): else: self.checkonstart = False + def periodical(self): if self.core.debug: if self.getConfig('reloadplugins'): @@ -80,6 +83,8 @@ class UpdateManager(Addon): self.update() @Expose + + def autoreloadPlugins(self): """ reload and reindex all modified plugins """ modules = filter( @@ -108,6 +113,7 @@ class UpdateManager(Addon): return True if self.core.pluginManager.reloadPlugins(reloads) else False + def server_response(self): try: return getURL(self.SERVER_URL, get={'v': self.core.api.getServerVersion()}).splitlines() @@ -117,6 +123,8 @@ class UpdateManager(Addon): @Expose @threaded + + def update(self): """ check for updates """ @@ -127,6 +135,7 @@ class UpdateManager(Addon): else: self.core.api.unpauseServer() + def _update(self): data = self.server_response() @@ -156,6 +165,7 @@ class UpdateManager(Addon): # 2 = Plugins updated, but restart required return exitcode + def _updatePlugins(self, data): """ check for plugin updates """ @@ -266,6 +276,8 @@ class UpdateManager(Addon): return exitcode @Expose + + def removePlugins(self, type_plugins): """ delete plugins from disk """ |