Add config option to force SSL connections to PMS.

This commit is contained in:
Tim 2015-07-17 01:09:27 +02:00
parent 4f00ecc070
commit 61daedf1a5
3 changed files with 12 additions and 2 deletions

View file

@ -181,6 +181,12 @@
<p class="help-block">If you have media indexing enabled on your server, use these on the activity pane.</p> <p class="help-block">If you have media indexing enabled on your server, use these on the activity pane.</p>
</div> </div>
</fieldset> </fieldset>
<fieldset>
<div class="checkbox">
<input type="checkbox" id="pms_ssl" name="pms_ssl" value="1" ${config['pms_ssl']}> Force SSL
<p class="help-block">Force PlexPy to connect to your Plex Server via SSL.</p>
</div>
</fieldset>
<div class="wellheader"> <div class="wellheader">
<h3>Plex Logs</h3> <h3>Plex Logs</h3>
</div> </div>

View file

@ -24,7 +24,10 @@ class PmsConnect(object):
""" """
def __init__(self): def __init__(self):
self.protocol = 'HTTP' if plexpy.CONFIG.PMS_SSL:
self.protocol = 'HTTPS'
else:
self.protocol = 'HTTP'
self.request_handler = http_handler.HTTPHandler(host=plexpy.CONFIG.PMS_IP, self.request_handler = http_handler.HTTPHandler(host=plexpy.CONFIG.PMS_IP,
port=plexpy.CONFIG.PMS_PORT, port=plexpy.CONFIG.PMS_PORT,
token=plexpy.CONFIG.PMS_TOKEN) token=plexpy.CONFIG.PMS_TOKEN)

View file

@ -368,6 +368,7 @@ class WebInterface(object):
"pms_logs_folder": plexpy.CONFIG.PMS_LOGS_FOLDER, "pms_logs_folder": plexpy.CONFIG.PMS_LOGS_FOLDER,
"pms_port": plexpy.CONFIG.PMS_PORT, "pms_port": plexpy.CONFIG.PMS_PORT,
"pms_token": plexpy.CONFIG.PMS_TOKEN, "pms_token": plexpy.CONFIG.PMS_TOKEN,
"pms_ssl": checked(plexpy.CONFIG.PMS_SSL),
"pms_use_bif": checked(plexpy.CONFIG.PMS_USE_BIF), "pms_use_bif": checked(plexpy.CONFIG.PMS_USE_BIF),
"pms_uuid": plexpy.CONFIG.PMS_UUID, "pms_uuid": plexpy.CONFIG.PMS_UUID,
"plexwatch_database": plexpy.CONFIG.PLEXWATCH_DATABASE, "plexwatch_database": plexpy.CONFIG.PLEXWATCH_DATABASE,
@ -410,7 +411,7 @@ class WebInterface(object):
"pushover_enabled", "pushbullet_enabled", "pushover_enabled", "pushbullet_enabled",
"twitter_enabled", "osx_notify_enabled", "twitter_enabled", "osx_notify_enabled",
"boxcar_enabled", "email_enabled", "email_tls", "boxcar_enabled", "email_enabled", "email_tls",
"grouping_global_history", "grouping_user_history", "grouping_charts", "pms_use_bif", "grouping_global_history", "grouping_user_history", "grouping_charts", "pms_use_bif", "pms_ssl",
"tv_notify_enable", "movie_notify_enable", "music_notify_enable", "tv_notify_enable", "movie_notify_enable", "music_notify_enable",
"tv_notify_on_start", "movie_notify_on_start", "music_notify_on_start", "tv_notify_on_start", "movie_notify_on_start", "music_notify_on_start",
"tv_notify_on_stop", "movie_notify_on_stop", "music_notify_on_stop", "tv_notify_on_stop", "movie_notify_on_stop", "music_notify_on_stop",