mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Add QR code to link PlexPy Remote android app
This commit is contained in:
parent
ebf014406d
commit
9e64463e70
3 changed files with 126 additions and 10 deletions
|
@ -4607,3 +4607,30 @@ class WebInterface(object):
|
|||
"""
|
||||
whois_info = helpers.whois_lookup(ip_address)
|
||||
return whois_info
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
@requireAuth()
|
||||
def get_plexpy_url(self, **kwargs):
|
||||
if plexpy.CONFIG.ENABLE_HTTPS:
|
||||
scheme = 'https'
|
||||
else:
|
||||
scheme = 'http'
|
||||
|
||||
if plexpy.CONFIG.HTTP_HOST == '0.0.0.0':
|
||||
import socket
|
||||
hostname = socket.gethostbyname(socket.gethostname())
|
||||
else:
|
||||
hostname = plexpy.CONFIG.HTTP_HOST
|
||||
|
||||
if plexpy.CONFIG.HTTP_PORT not in (80, 443):
|
||||
port = ':' + str(plexpy.CONFIG.HTTP_PORT)
|
||||
else:
|
||||
port = ''
|
||||
|
||||
if plexpy.CONFIG.HTTP_ROOT:
|
||||
root = '/' + plexpy.CONFIG.HTTP_ROOT.strip('/')
|
||||
else:
|
||||
root = ''
|
||||
|
||||
return scheme + '://' + hostname + port + root
|
Loading…
Add table
Add a link
Reference in a new issue