mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Add status API command
This commit is contained in:
parent
235d6f259e
commit
4743538de8
3 changed files with 51 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
from urllib import urlencode
|
||||
|
||||
import plexpy
|
||||
import cherrypy
|
||||
|
@ -112,6 +113,9 @@ def initialize(options):
|
|||
'/api': {
|
||||
'tools.auth_basic.on': False
|
||||
},
|
||||
'/status': {
|
||||
'tools.auth_basic.on': False
|
||||
},
|
||||
'/interfaces': {
|
||||
'tools.staticdir.on': True,
|
||||
'tools.staticdir.dir': "interfaces",
|
||||
|
@ -231,6 +235,12 @@ class BaseRedirect(object):
|
|||
def index(self):
|
||||
raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT)
|
||||
|
||||
@cherrypy.expose
|
||||
def status(self, *args, **kwargs):
|
||||
path = '/' + '/'.join(args) if args else ''
|
||||
query = '?' + urlencode(kwargs) if kwargs else ''
|
||||
raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + 'status' + path + query)
|
||||
|
||||
|
||||
def proxy():
|
||||
# logger.debug(u"REQUEST URI: %s, HEADER [X-Forwarded-Host]: %s, [X-Host]: %s, [Origin]: %s, [Host]: %s",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue