Improve startup speed by refreshing on a separate thread

This commit is contained in:
JonnyWong16 2020-10-25 13:07:42 -07:00
parent 8157ee7811
commit 558023e18e
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
5 changed files with 122 additions and 77 deletions

View file

@ -6545,6 +6545,31 @@ class WebInterface(object):
return status
@cherrypy.expose
@cherrypy.tools.json_out()
@addtoapi()
def server_status(self, *args, **kwargs):
""" Get the current status of Tautulli's connection to the Plex server.
```
Required parameters:
None
Optional parameters:
None
Returns:
json:
{"result": "success",
"connected": true,
}
```
"""
cherrypy.response.headers['Cache-Control'] = "max-age=0,no-cache,no-store"
status = {'result': 'success', 'connected': plexpy.PLEX_SERVER_UP}
return status
@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth(member_of("admin"))