select.lua: support extracting ytdl_hook subtitles

They don't work because they have EDL URLs, but we can attempt to
extract their real URLs.
This commit is contained in:
Guido Cella 2024-05-31 15:52:51 +02:00 committed by Kacper Michajłow
parent 5657cd65b7
commit 75645263dd
1 changed files with 5 additions and 0 deletions

View File

@ -195,6 +195,11 @@ mp.add_forced_key_binding(nil, "select-subtitle-line", function ()
return
end
if sub.external and sub["external-filename"]:find("^edl://") then
sub["external-filename"] = sub["external-filename"]:match('https?://.*')
or sub["external-filename"]
end
local r = mp.command_native({
name = "subprocess",
capture_stdout = true,