From 03ec3f0c68e5ca15e7cb7f93c8fc404bc6aec1f5 Mon Sep 17 00:00:00 2001 From: ubuntu Date: Sat, 5 Sep 2026 01:51:13 +0000 Subject: [PATCH] Speed up device snapshot cadence for a near-live thumbnail Lower the default and minimum snapshot interval (10s/2s -> 2s/1s) and refresh the selected device's thumbnail on its own 1s timer instead of waiting for the 5s device-list poll, so the preview updates fast enough to feel close to live video without building an actual streaming pipeline. Co-Authored-By: Claude Sonnet 5 --- static/IPTV.py | 8 ++++---- static/index.html | 29 +++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/static/IPTV.py b/static/IPTV.py index 38804cb..c08b2a9 100644 --- a/static/IPTV.py +++ b/static/IPTV.py @@ -1114,8 +1114,8 @@ def communication(data): except (TypeError, ValueError): sendMessage(toSidDevice, fromSidDevice, 'warning', 'Invalid snapshot interval', 0) else: - if interval_seconds < 2: - sendMessage(toSidDevice, fromSidDevice, 'warning', 'Snapshot interval must be at least 2 seconds', 0) + if interval_seconds < 1: + sendMessage(toSidDevice, fromSidDevice, 'warning', 'Snapshot interval must be at least 1 second', 0) else: SNAPSHOT_INTERVAL_SECONDS = interval_seconds sendMessage( @@ -1302,7 +1302,7 @@ def initIPTV(): # ---------------------------------------------------------------- # ---------------------------------------------------------------- -num_version='5.0.6' +num_version='5.0.7' # ---------------------------------------------------------------- # ---------------------------------------------------------------- @@ -1328,7 +1328,7 @@ mediaRunning = '' status_vpn = 'disconnected' data_running = {} auto_snapshot_enabled = True -SNAPSHOT_INTERVAL_SECONDS = 10 +SNAPSHOT_INTERVAL_SECONDS = 2 POLLING_INTERVAL_SECONDS = 10 SOCKET_CONNECT_TIMEOUT = 10 SOCKET_RETRY_MIN_INTERVAL = 3 diff --git a/static/index.html b/static/index.html index 8de2d60..3afe9f1 100644 --- a/static/index.html +++ b/static/index.html @@ -1220,7 +1220,7 @@