fix: show cache indication whenever cache is available (#240)

This commit is contained in:
Zhong Lufan
2022-09-22 21:34:50 +08:00
committed by GitHub
parent 5082ad0a83
commit d20f47c8ea

View File

@@ -4246,7 +4246,7 @@ end))
mp.observe_property('demuxer-cache-state', 'native', function(prop, cache_state)
local cached_ranges = cache_state and cache_state['seekable-ranges'] or {}
local uncached_ranges = nil
if state.duration and state.is_stream then
if state.duration and #cached_ranges > 0 then
-- Normalize
local ranges = {}
for _, range in ipairs(cached_ranges) do