mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
Improve startup speed by refreshing on a separate thread
This commit is contained in:
parent
8157ee7811
commit
558023e18e
5 changed files with 122 additions and 77 deletions
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue