Skip to content

Commit 2c543b6

Browse files
author
arch
committed
fix ofs integration lua script
1 parent 9075b21 commit 2c543b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

contrib/OpenFunscripter/funscript_generator_linux.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function GetActions(video)
88
local at = {}
99
local pos = {}
1010
local next_action = CurrentScript:GetClosestActionAfter(CurrentTimeMs)
11-
if not next_action == nil and next_action.at < CurrentTimeMs + 500.0 then
11+
if next_action and next_action.at < CurrentTimeMs + 500.0 then
1212
next_action = CurrentScript:GetClosestActionAfter(next_action.at)
1313
end
1414
local command = 'python3 "'..Settings.PythonScript..'" --generator -s '..(next_action == nil and tostring(CurrentTimeMs) or tostring(CurrentTimeMs)..' -e '..tostring(next_action.at))..' -i "'..video..'" -o "'..Settings.TmpFile..'"'

contrib/OpenFunscripter/funscript_generator_windows.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function GetActions(video)
88
local at = {}
99
local pos = {}
1010
local next_action = CurrentScript:GetClosestActionAfter(CurrentTimeMs)
11-
if not next_action == nil and next_action.at < CurrentTimeMs + 500.0 then
11+
if next_action and next_action.at < CurrentTimeMs + 500.0 then
1212
next_action = CurrentScript:GetClosestActionAfter(next_action.at)
1313
end
1414
local command = '""'..Settings.FunscriptGenerator..'" --generator -s '..(next_action == nil and tostring(CurrentTimeMs) or tostring(CurrentTimeMs)..' -e '..tostring(next_action.at))..' -i "'..video..'" -o "'..Settings.TmpFile..'"'

0 commit comments

Comments
 (0)