From a59cb3b16103173b8d42e16f1768f5e21d993ad2 Mon Sep 17 00:00:00 2001 From: Eric Solari Date: Tue, 15 Mar 2016 16:12:27 -0500 Subject: [PATCH 1/2] Add cherrypy environmnet option --- PlexPy.py | 1 + plexpy/config.py | 1 + plexpy/webstart.py | 1 + 3 files changed, 3 insertions(+) diff --git a/PlexPy.py b/PlexPy.py index 15e3212e..840a5540 100755 --- a/PlexPy.py +++ b/PlexPy.py @@ -179,6 +179,7 @@ def main(): # Try to start the server. Will exit here is address is already in use. web_config = { 'http_port': http_port, + 'http_environment': plexpy.CONFIG.HTTP_ENVIRONMENT, 'http_host': plexpy.CONFIG.HTTP_HOST, 'http_root': plexpy.CONFIG.HTTP_ROOT, 'http_proxy': plexpy.CONFIG.HTTP_PROXY, diff --git a/plexpy/config.py b/plexpy/config.py index ccb05c6d..996a3c18 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -142,6 +142,7 @@ _CONFIG_DEFINITIONS = { 'HTTPS_KEY': (str, 'General', ''), 'HTTPS_DOMAIN': (str, 'General', 'localhost'), 'HTTPS_IP': (str, 'General', '127.0.0.1'), + 'HTTP_ENVIRONMENT': (str, 'General', 'production'), 'HTTP_HOST': (str, 'General', '0.0.0.0'), 'HTTP_PASSWORD': (str, 'General', ''), 'HTTP_PORT': (int, 'General', 8181), diff --git a/plexpy/webstart.py b/plexpy/webstart.py index b1eae170..e72b3db9 100644 --- a/plexpy/webstart.py +++ b/plexpy/webstart.py @@ -44,6 +44,7 @@ def initialize(options): enable_https = False options_dict = { + 'environment' :options['http_environment'], 'server.socket_port': options['http_port'], 'server.socket_host': options['http_host'], 'server.thread_pool': 10, From 52dfa1db093a55aa1cab748c829bc14a3424156c Mon Sep 17 00:00:00 2001 From: Eric Solari Date: Tue, 15 Mar 2016 16:28:52 -0500 Subject: [PATCH 2/2] Update webstart.py --- plexpy/webstart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/webstart.py b/plexpy/webstart.py index e72b3db9..3cc0e037 100644 --- a/plexpy/webstart.py +++ b/plexpy/webstart.py @@ -44,7 +44,7 @@ def initialize(options): enable_https = False options_dict = { - 'environment' :options['http_environment'], + 'environment': options['http_environment'], 'server.socket_port': options['http_port'], 'server.socket_host': options['http_host'], 'server.thread_pool': 10,