From e2e7063a2980c0e7275d4952602fa29e0c50d378 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Tue, 28 Apr 2020 18:39:12 -0700 Subject: [PATCH] Expose remote access check settings in the UI --- data/interfaces/default/settings.html | 23 +++++++++++++++++++++++ plexpy/webserve.py | 3 +++ 2 files changed, 26 insertions(+) diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 20fe51a6..76220b82 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -850,6 +850,28 @@

Enable to have Tautulli check if remote access to the Plex Media Server goes down.

+
+
+ +
+
+ +
+ +
+

The interval (in seconds) Tautulli will ping the Plex Media Server for the remote access status. Minimum 60.

+
+
+ +
+
+ +
+ +
+

The number of consecutive remote access status failures to consider remote access as down. Minimum 1.

+
+
@@ -2043,6 +2065,7 @@ $(document).ready(function() { initConfigCheckbox('#https_create_cert'); initConfigCheckbox('#check_github'); initConfigCheckbox('#monitor_pms_updates'); + initConfigCheckbox('#monitor_remote_access'); initConfigCheckbox('#newsletter_self_hosted'); $('#menu_link_shutdown').click(function() { diff --git a/plexpy/webserve.py b/plexpy/webserve.py index db81fb58..3c8b71ed 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -2897,6 +2897,8 @@ class WebInterface(object): "grouping_charts": checked(plexpy.CONFIG.GROUPING_CHARTS), "monitor_pms_updates": checked(plexpy.CONFIG.MONITOR_PMS_UPDATES), "monitor_remote_access": checked(plexpy.CONFIG.MONITOR_REMOTE_ACCESS), + "remote_access_ping_interval": plexpy.CONFIG.REMOTE_ACCESS_PING_INTERVAL, + "remote_access_ping_threshold": plexpy.CONFIG.REMOTE_ACCESS_PING_THRESHOLD, "refresh_libraries_interval": plexpy.CONFIG.REFRESH_LIBRARIES_INTERVAL, "refresh_libraries_on_startup": checked(plexpy.CONFIG.REFRESH_LIBRARIES_ON_STARTUP), "refresh_users_interval": plexpy.CONFIG.REFRESH_USERS_INTERVAL, @@ -3022,6 +3024,7 @@ class WebInterface(object): kwargs.get('pms_update_check_interval') != str(plexpy.CONFIG.PMS_UPDATE_CHECK_INTERVAL) or \ kwargs.get('monitor_pms_updates') != plexpy.CONFIG.MONITOR_PMS_UPDATES or \ kwargs.get('monitor_remote_access') != plexpy.CONFIG.MONITOR_REMOTE_ACCESS or \ + kwargs.get('remote_access_ping_interval') != plexpy.CONFIG.REMOTE_ACCESS_PING_INTERVAL or \ kwargs.get('pms_url_manual') != plexpy.CONFIG.PMS_URL_MANUAL: reschedule = True