Use global port and root when getting self URL
This commit is contained in:
@@ -1117,13 +1117,13 @@ def get_plexpy_url(hostname=None):
|
|||||||
else:
|
else:
|
||||||
hostname = hostname or plexpy.CONFIG.HTTP_HOST
|
hostname = hostname or plexpy.CONFIG.HTTP_HOST
|
||||||
|
|
||||||
if plexpy.CONFIG.HTTP_PORT not in (80, 443):
|
if plexpy.HTTP_PORT not in (80, 443):
|
||||||
port = ':' + str(plexpy.CONFIG.HTTP_PORT)
|
port = ':' + str(plexpy.HTTP_PORT)
|
||||||
else:
|
else:
|
||||||
port = ''
|
port = ''
|
||||||
|
|
||||||
if plexpy.CONFIG.HTTP_ROOT.strip('/'):
|
if plexpy.HTTP_ROOT.strip('/'):
|
||||||
root = '/' + plexpy.CONFIG.HTTP_ROOT.strip('/')
|
root = '/' + plexpy.HTTP_ROOT.strip('/')
|
||||||
else:
|
else:
|
||||||
root = ''
|
root = ''
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user