mirror of https://github.com/mpv-player/mpv
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:
parent
5657cd65b7
commit
75645263dd
|
@ -195,6 +195,11 @@ mp.add_forced_key_binding(nil, "select-subtitle-line", function ()
|
||||||
return
|
return
|
||||||
end
|
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({
|
local r = mp.command_native({
|
||||||
name = "subprocess",
|
name = "subprocess",
|
||||||
capture_stdout = true,
|
capture_stdout = true,
|
||||||
|
|
Loading…
Reference in New Issue