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