mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Allow manual PMS URL override in config file for XML shortcuts
This commit is contained in:
parent
50c5407a46
commit
668913fd60
2 changed files with 11 additions and 1 deletions
|
@ -276,9 +276,18 @@ class WebInterface(object):
|
|||
@requireAuth(member_of("admin"))
|
||||
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
|
||||
|
||||
if plextv:
|
||||
base_url = 'https://plex.tv'
|
||||
else:
|
||||
if plexpy.CONFIG.PMS_URL_OVERRIDE:
|
||||
base_url = plexpy.CONFIG.PMS_URL_OVERRIDE
|
||||
else:
|
||||
base_url = plexpy.CONFIG.PMS_URL
|
||||
|
||||
if '{machine_id}' in endpoint:
|
||||
endpoint = endpoint.format(machine_id=plexpy.CONFIG.PMS_IDENTIFIER)
|
||||
|
||||
return base_url + endpoint + '?' + urllib.urlencode(kwargs)
|
||||
|
||||
@cherrypy.expose
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue