From 819829554bd940c51644c20f8c1220970baaef19 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Thu, 21 Mar 2019 08:50:28 -0700 Subject: [PATCH] Use global port and root when getting self URL --- plexpy/helpers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plexpy/helpers.py b/plexpy/helpers.py index 87450f6e..fbd7d205 100644 --- a/plexpy/helpers.py +++ b/plexpy/helpers.py @@ -1117,13 +1117,13 @@ def get_plexpy_url(hostname=None): else: hostname = hostname or plexpy.CONFIG.HTTP_HOST - if plexpy.CONFIG.HTTP_PORT not in (80, 443): - port = ':' + str(plexpy.CONFIG.HTTP_PORT) + if plexpy.HTTP_PORT not in (80, 443): + port = ':' + str(plexpy.HTTP_PORT) else: port = '' - if plexpy.CONFIG.HTTP_ROOT.strip('/'): - root = '/' + plexpy.CONFIG.HTTP_ROOT.strip('/') + if plexpy.HTTP_ROOT.strip('/'): + root = '/' + plexpy.HTTP_ROOT.strip('/') else: root = ''