alldebrid plugin optimization and mpv playlist fix

This commit is contained in:
2026-04-26 13:48:18 -07:00
parent 67c272db4b
commit c724cb36b1
7 changed files with 147 additions and 31 deletions
+6 -1
View File
@@ -5683,13 +5683,18 @@ mp.register_event('file-loaded', function()
mp.add_timeout(0.1, function()
M._reset_uosc_input_state('file-loaded-web')
end)
_format_cache_poll_generation = _format_cache_poll_generation + 1
if _extract_store_hash(url) or not _is_ytdlp_url(url) then
return
end
local ok, err = _cache_formats_from_current_playback('file-loaded')
if ok then
_lua_log('formats: file-loaded cache succeeded for url=' .. url)
else
_lua_log('formats: file-loaded cache pending reason=' .. tostring(err or 'unknown'))
end
_format_cache_poll_generation = _format_cache_poll_generation + 1
_schedule_playback_format_cache_poll(url, _format_cache_poll_generation, 1)
_prefetch_formats_for_url(url)
end)