From b248dbacf2aefc16720fb2d9374ced0144f665e2 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 27 Jun 2018 14:04:28 -0700 Subject: [PATCH] Correct script environment if http host changed --- plexpy/helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plexpy/helpers.py b/plexpy/helpers.py index 41a6f09b..ad9e4724 100644 --- a/plexpy/helpers.py +++ b/plexpy/helpers.py @@ -1083,6 +1083,8 @@ def get_plexpy_url(hostname=None): if not hostname: hostname = 'localhost' + elif hostname == 'localhost' and plexpy.CONFIG.HTTP_HOST != '0.0.0.0': + hostname = plexpy.CONFIG.HTTP_HOST else: hostname = hostname or plexpy.CONFIG.HTTP_HOST