From 256cfc5f828d4902297bb4366af0095437deafea Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Sun, 7 Dec 2025 11:44:58 +0100 Subject: [PATCH] fix: skip cache warning near end of video Low cache is expected when the video is about to end, not a sign of buffering issues. --- scripts/playback-health.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/playback-health.lua b/scripts/playback-health.lua index 42ff52f..a2cad04 100644 --- a/scripts/playback-health.lua +++ b/scripts/playback-health.lua @@ -139,6 +139,10 @@ local function on_cache_duration(_, duration) return end if duration and duration < config.cache_warning_seconds and duration > 0 then + local time_remaining = mp.get_property_number("playtime-remaining", 999) + if time_remaining < config.cache_warning_seconds * 2 then + return + end show_warning("cache", ("Low cache: %.1fs remaining"):format(duration)) end end