summaryrefslogtreecommitdiffstats
path: root/player/lua/ytdl_hook.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player/lua/ytdl_hook.lua')
-rw-r--r--player/lua/ytdl_hook.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 0656f01998..57023e224e 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -658,7 +658,8 @@ local function add_single_video(json)
edl = edl .. ",codec=" .. codec
end
edl = edl .. ";" .. edl_escape(sub)
- mp.commandv("sub-add", edl, "auto", sub_info.ext, lang)
+ local title = sub_info.name or sub_info.ext
+ mp.commandv("sub-add", edl, "auto", title, lang)
else
msg.verbose("No subtitle data/url for ["..lang.."]")
end