mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 08:42:59 -07:00
Allow secure websocket connections.
This commit is contained in:
parent
16756ddb8c
commit
82b7128c04
2 changed files with 8 additions and 5 deletions
|
@ -490,7 +490,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
<input type="checkbox" class="monitor-settings" id="monitoring_use_websocket" name="monitoring_use_websocket" value="1" ${config['monitoring_use_websocket']}> Use Websocket (requires restart) [experimental]
|
<input type="checkbox" class="monitor-settings" id="monitoring_use_websocket" name="monitoring_use_websocket" value="1" ${config['monitoring_use_websocket']}> Use Websocket (requires restart) [experimental]
|
||||||
</label>
|
</label>
|
||||||
<p class="help-block">Instead of polling the server at regular intervals let the server tell us when something happens.<br />
|
<p class="help-block">Instead of polling the server at regular intervals let the server tell us when something happens.<br />
|
||||||
This is currently experimental. Encrypted websocket is not currently supported.</p>
|
This is currently experimental.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
|
|
|
@ -37,6 +37,9 @@ def start_thread():
|
||||||
def run():
|
def run():
|
||||||
from websocket import create_connection
|
from websocket import create_connection
|
||||||
|
|
||||||
|
if plexpy.CONFIG.PMS_SSL and plexpy.CONFIG.PMS_URL[:5] == 'https':
|
||||||
|
uri = plexpy.CONFIG.PMS_URL.replace('https://', 'wss://') + '/:/websockets/notifications'
|
||||||
|
else:
|
||||||
uri = 'ws://%s:%s/:/websockets/notifications' % (
|
uri = 'ws://%s:%s/:/websockets/notifications' % (
|
||||||
plexpy.CONFIG.PMS_IP,
|
plexpy.CONFIG.PMS_IP,
|
||||||
plexpy.CONFIG.PMS_PORT
|
plexpy.CONFIG.PMS_PORT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue