Accept non empty sub-text like we did previously
This commit is contained in:
parent
7556942813
commit
60d5e6f681
|
@ -6,6 +6,7 @@ leadin = 1
|
||||||
normalspeed=mp.get_property_native("speed")
|
normalspeed=mp.get_property_native("speed")
|
||||||
|
|
||||||
function set_timeout()
|
function set_timeout()
|
||||||
|
local time_out
|
||||||
if mp.get_property_native("cache-size") ~= nil then
|
if mp.get_property_native("cache-size") ~= nil then
|
||||||
time_out = mp.get_property_native("cache-secs")
|
time_out = mp.get_property_native("cache-secs")
|
||||||
else
|
else
|
||||||
|
@ -25,7 +26,7 @@ function check_should_speedup()
|
||||||
local subdelay = mp.get_property_native("sub-delay")
|
local subdelay = mp.get_property_native("sub-delay")
|
||||||
mp.command("no-osd set sub-visibility no")
|
mp.command("no-osd set sub-visibility no")
|
||||||
mp.command("no-osd sub-step 1")
|
mp.command("no-osd sub-step 1")
|
||||||
local mark = mp.get_property("time-pos")
|
local mark = mp.get_property_native("time-pos")
|
||||||
local nextsubdelay = mp.get_property_native("sub-delay")
|
local nextsubdelay = mp.get_property_native("sub-delay")
|
||||||
local nextsub = subdelay - nextsubdelay
|
local nextsub = subdelay - nextsubdelay
|
||||||
mp.set_property("sub-delay", subdelay)
|
mp.set_property("sub-delay", subdelay)
|
||||||
|
@ -59,7 +60,7 @@ function speed_transition(_, sub)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif state == 1 then
|
elseif state == 1 then
|
||||||
if sub ~= "" and sub ~= nil then
|
if sub ~= "" then
|
||||||
mp.unobserve_property(check_position)
|
mp.unobserve_property(check_position)
|
||||||
restore_normalspeed()
|
restore_normalspeed()
|
||||||
state = 0
|
state = 0
|
||||||
|
|
Loading…
Reference in New Issue