Mask app on restart and shutdown

This commit is contained in:
Ruud committed 2011-11-11 17:38:52 +01:00
1 parent 668b95353f
commit dc58859596
5 files changed
+59 -11

No files matched your search

+7
View File
@@ -1,6 +1,7 @@
from couchpotato import app
from couchpotato.api import addApiView
from couchpotato.core.event import fireEvent, addEvent
from couchpotato.core.helpers.request import jsonified
from couchpotato.core.helpers.variable import cleanHost
from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
@@ -21,6 +22,7 @@ class Core(Plugin):
def __init__(self):
addApiView('app.shutdown', self.shutdown)
addApiView('app.restart', self.restart)
addApiView('app.available', self.available)
addEvent('app.crappy_restart', self.crappyRestart)
addEvent('app.load', self.launchBrowser, priority = 100)
@@ -28,6 +30,11 @@ class Core(Plugin):
self.removeRestartFile()
def available(self):
return jsonified({
'succes': True
})
def crappyRestart(self):
ctx = app.test_request_context()
ctx.push()