select.lua: seek to the currect subtitle line when paused without video

Add an offset to sub seek correctly like in b35e34ae2f. The extra 0.01
offset apparently isn't necessary in this case.
This commit is contained in:
Guido Cella authored and Kacper Michajłow committed 2024-06-07 22:45:41 +02:00
1 parent 4059d1832b
commit 8939bfc3ef
1 file changed
+5 -1
+5 -1
View File
@@ -239,7 +239,11 @@ mp.add_forced_key_binding(nil, "select-subtitle-line", function ()
items = sub_lines,
default_item = default_item,
submit = function (index)
mp.commandv("seek", sub_times[index], "absolute")
-- Add an offset to seek to the correct line while paused without a
-- video track.
local offset = mp.get_property_native("current-tracks/video/image") == false
and 0 or .09
mp.commandv("seek", sub_times[index] + offset, "absolute")
end,
})
end)