diff options
-rw-r--r-- | player/lua/ytdl_hook.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index 10c5a39b2b..010e90c582 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -78,9 +78,10 @@ mp.add_hook("on_load", 10, function () local format = mp.get_property("options/ytdl-format") local raw_options = mp.get_property_native("options/ytdl-raw-options") + local allsubs = true local command = { - ytdl.path, "--no-warnings", "-J", "--flat-playlist", "--all-subs", + ytdl.path, "--no-warnings", "-J", "--flat-playlist", "--sub-format", "ass/srt/best", "--no-playlist" } @@ -103,6 +104,13 @@ mp.add_hook("on_load", 10, function () if (arg ~= "") then table.insert(command, arg) end + if (param == "sub-lang") and (arg ~= "") then + allsubs = false + end + end + + if (allsubs == true) then + table.insert(command, "--all-subs") end table.insert(command, "--") table.insert(command, url) |