Accept non empty sub-text like we did previously

This commit is contained in:
zenyd 2017-10-01 00:03:12 +02:00
parent 7556942813
commit 60d5e6f681
1 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ leadin = 1
normalspeed=mp.get_property_native("speed")
function set_timeout()
local time_out
if mp.get_property_native("cache-size") ~= nil then
time_out = mp.get_property_native("cache-secs")
else
@ -25,7 +26,7 @@ function check_should_speedup()
local subdelay = mp.get_property_native("sub-delay")
mp.command("no-osd set sub-visibility no")
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 nextsub = subdelay - nextsubdelay
mp.set_property("sub-delay", subdelay)
@ -59,7 +60,7 @@ function speed_transition(_, sub)
end
end
elseif state == 1 then
if sub ~= "" and sub ~= nil then
if sub ~= "" then
mp.unobserve_property(check_position)
restore_normalspeed()
state = 0