Skip to content

Commit

Permalink
ytdl: trigger hook only after profiles application
Browse files Browse the repository at this point in the history
  • Loading branch information
stanoarn committed Jan 10, 2025
1 parent f049a1e commit f578383
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion player/lua/ytdl_hook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,8 @@ local function on_load_hook(load_fail)
run_ytdl_hook(url)
end

mp.add_hook("on_load", 10, function() on_load_hook(false) end)
-- ensure ytdl hook triggers AFTER profiles have been applied
mp.add_hook("on_load", 60, function() on_load_hook(false) end)
mp.add_hook("on_load_fail", 10, function() on_load_hook(true) end)

mp.add_hook("on_load", 20, function ()
Expand Down

0 comments on commit f578383

Please sign in to comment.