Fix continuous seeking for a tiny amount (e.g. 0.002s)
This commit is contained in:
parent
8bcc5d180d
commit
1087729c5f
|
@ -70,7 +70,9 @@ function observePlaybackTime(_, current_pos)
|
|||
end
|
||||
|
||||
for _, segment in pairs(video_data.segments) do
|
||||
local seek_offset = segment.segment[2] - current_pos
|
||||
if current_pos >= segment.segment[1] and segment.segment[2] > current_pos
|
||||
and seek_offset >= 0.01
|
||||
and segment.category ~= "full"
|
||||
and inTableValue(split(options.categories), segment.category) then
|
||||
local category_name = segment.category
|
||||
|
@ -79,8 +81,7 @@ function observePlaybackTime(_, current_pos)
|
|||
end
|
||||
|
||||
if segment.actionType == "skip" then
|
||||
mp.osd_message("[sponsorblock] Skipping " .. segment.segment[2] - current_pos
|
||||
.. "s " .. category_name)
|
||||
mp.osd_message("[sponsorblock] Skipping " .. seek_offset .. "s " .. category_name)
|
||||
mp.set_property_number("playback-time", segment.segment[2])
|
||||
current_pos = segment.segment[2]
|
||||
elseif segment.actionType == "mute" then
|
||||
|
|
Loading…
Reference in New Issue