mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Add Plex XML shortcuts for metadata and server resources
This commit is contained in:
parent
917d19db85
commit
c85af521fe
5 changed files with 30 additions and 15 deletions
|
@ -18,6 +18,7 @@ import json
|
|||
import os
|
||||
import shutil
|
||||
import threading
|
||||
import urllib
|
||||
|
||||
import cherrypy
|
||||
from cherrypy.lib.static import serve_file, serve_download
|
||||
|
@ -273,8 +274,10 @@ class WebInterface(object):
|
|||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
@requireAuth(member_of("admin"))
|
||||
def return_sessions_url(self, **kwargs):
|
||||
return plexpy.CONFIG.PMS_URL + '/status/sessions?X-Plex-Token=' + plexpy.CONFIG.PMS_TOKEN
|
||||
def return_plex_xml_url(self, endpoint='', plextv=False, **kwargs):
|
||||
kwargs['X-Plex-Token'] = plexpy.CONFIG.PMS_TOKEN
|
||||
base_url = 'https://plex.tv' if plextv else plexpy.CONFIG.PMS_URL
|
||||
return base_url + endpoint + '?' + urllib.urlencode(kwargs)
|
||||
|
||||
@cherrypy.expose
|
||||
@requireAuth()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue