diff --git a/plexpy/activity_pinger.py b/plexpy/activity_pinger.py index 04c73fd8..00dc143f 100644 --- a/plexpy/activity_pinger.py +++ b/plexpy/activity_pinger.py @@ -301,14 +301,14 @@ def check_server_access(): % str(ext_ping_count)) # Reset external ping counter else: - if ext_ping_count >= 3: + if ext_ping_count >= plexpy.CONFIG.REMOTE_ACCESS_PING_THRESHOLD: logger.info(u"PlexPy Monitor :: Plex remote access is back up.") plexpy.NOTIFY_QUEUE.put({'notify_action': 'on_extup'}) ext_ping_count = 0 - if ext_ping_count == 3: + if ext_ping_count == plexpy.CONFIG.REMOTE_ACCESS_PING_THRESHOLD: plexpy.NOTIFY_QUEUE.put({'notify_action': 'on_extdown'}) diff --git a/plexpy/config.py b/plexpy/config.py index 5d208ffb..d5fc6197 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -460,6 +460,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_THRESHOLD': (int, 'Advanced', 3), 'SESSION_DB_WRITE_ATTEMPTS': (int, 'Advanced', 5), 'SLACK_ENABLED': (int, 'Slack', 0), 'SLACK_HOOK': (str, 'Slack', ''),