Update speed-transition.lua (#52)

only activate on "text based" subtitles
This commit is contained in:
bitingsock 2024-01-26 07:37:18 -08:00 committed by GitHub
parent 3ad7502fe2
commit 7100d19d18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -122,7 +122,8 @@ function speed_transition(_, sub)
sub = ""
end;
if state == 0 then
if sub == "" then
local subcodec = mp.get_property("current-tracks/sub/codec")
      if sub == "" and subcodec and (subcodec=="subrip" or subcodec=="ass" or subcodec=="webvtt") then
last_speedup_zone_begin = speedup_zone_begin
nextsub, shouldspeedup, speedup_zone_begin = check_should_speedup()
mark = speedup_zone_begin