diff --git a/plexpy/__init__.py b/plexpy/__init__.py index 86e6a3b0..0b5e3735 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -457,8 +457,10 @@ def initialize_scheduler(): schedule_job(plextv.get_server_resources, 'Refresh Plex server URLs', hours=12 * (not bool(CONFIG.PMS_URL_MANUAL)), minutes=0, seconds=0) + pms_remote_access_seconds = CONFIG.REMOTE_ACCESS_PING_INTERVAL if 60 <= CONFIG.REMOTE_ACCESS_PING_INTERVAL else 60 + schedule_job(activity_pinger.check_server_access, 'Check for Plex remote access', - hours=0, minutes=0, seconds=60 * bool(CONFIG.MONITOR_REMOTE_ACCESS)) + hours=0, minutes=0, seconds=pms_remote_access_seconds * bool(CONFIG.MONITOR_REMOTE_ACCESS)) schedule_job(activity_pinger.check_server_updates, 'Check for Plex updates', hours=pms_update_check_hours * bool(CONFIG.MONITOR_PMS_UPDATES), minutes=0, seconds=0) diff --git a/plexpy/config.py b/plexpy/config.py index d95f4b34..704bb171 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -491,6 +491,7 @@ _CONFIG_DEFINITIONS = { 'REFRESH_LIBRARIES_ON_STARTUP': (int, 'Monitoring', 1), 'REFRESH_USERS_INTERVAL': (int, 'Monitoring', 12), 'REFRESH_USERS_ON_STARTUP': (int, 'Monitoring', 1), + 'REMOTE_ACCESS_PING_INTERVAL': (int, 'Advanced', 60), 'REMOTE_ACCESS_PING_THRESHOLD': (int, 'Advanced', 3), 'SESSION_DB_WRITE_ATTEMPTS': (int, 'Advanced', 5), 'SHOW_ADVANCED_SETTINGS': (int, 'General', 0),