Simpler http root check when starting webserver

This commit is contained in:
JonnyWong16 2017-09-26 20:58:20 -07:00
parent 92a3589588
commit 76e9e24c41

View file

@ -78,10 +78,10 @@ def initialize(options):
else: else:
auth_enabled = session_enabled = basic_auth_enabled = False auth_enabled = session_enabled = basic_auth_enabled = False
if not options['http_root'] or options['http_root'] == '/': if options['http_root'].strip('/'):
plexpy.HTTP_ROOT = options['http_root'] = '/'
else:
plexpy.HTTP_ROOT = options['http_root'] = '/' + options['http_root'].strip('/') + '/' plexpy.HTTP_ROOT = options['http_root'] = '/' + options['http_root'].strip('/') + '/'
else:
plexpy.HTTP_ROOT = options['http_root'] = '/'
cherrypy.config.update(options_dict) cherrypy.config.update(options_dict)