File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
contrib/OpenFunscripter/extensions
Funscript Generator Linux
Funscript Generator Windows Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 1-
1+ -- Version: 0.0.1
22configFile = ofs .ExtensionDir () .. " /config"
33pythonScript = " "
44
@@ -14,21 +14,20 @@ function funscript_generator()
1414 print (" currentScriptIdx: " , ofs .ActiveIdx ())
1515 print (" currentTimeMs: " , currentTimeMs )
1616
17- local next_action = ofs .ClosestActionAfter (script , currentTimeMs )
18- if next_action and next_action .at < currentTimeMs + 500.0 then
19- next_action = ofs .ClosestActionAfter (script , next_action .at )
17+ local next_action = ofs .ClosestActionAfter (script , currentTimeMs / 1000 )
18+ if next_action and script . actions [ next_action ] .at < ( currentTimeMs + 500 ) then
19+ next_action = ofs .ClosestActionAfter (script , script . actions [ next_action ] .at / 1000 )
2020 end
2121
2222 if next_action then
23- print (" nextAction: " , next_action .at )
23+ print (" nextAction: " , script . actions [ next_action ] .at )
2424 else
2525 print (" nextAction: nil" )
2626 end
27-
2827 local command = ' python3 "'
2928 .. pythonScript
3029 .. ' " --generator -s '
31- .. ( next_action == nil and tostring (currentTimeMs ) or tostring (currentTimeMs ).. ' -e ' .. tostring (next_action .at ) )
30+ .. ( next_action == nil and tostring (currentTimeMs ) or tostring (currentTimeMs ).. ' -e ' .. tostring (script . actions [ next_action ] .at ) )
3231 .. ' -i "'
3332 .. video
3433 .. ' " -o "'
Original file line number Diff line number Diff line change 1-
1+ -- Version: 0.0.1
22configFile = ofs .ExtensionDir () .. " /config"
33pythonFunscriptGenerator = " "
44
@@ -13,21 +13,21 @@ function funscript_generator()
1313 print (" currentScriptIdx: " , ofs .ActiveIdx ())
1414 print (" currentTimeMs: " , currentTimeMs )
1515
16- local next_action = ofs .ClosestActionAfter (script , currentTimeMs )
17- if next_action and next_action .at < currentTimeMs + 500.0 then
18- next_action = ofs .ClosestActionAfter (script , next_action .at )
16+ local next_action = ofs .ClosestActionAfter (script , currentTimeMs / 1000 )
17+ if next_action and script . actions [ next_action ] .at < ( currentTimeMs + 500 ) then
18+ next_action = ofs .ClosestActionAfter (script , script . actions [ next_action ] .at / 1000 )
1919 end
2020
2121 if next_action then
22- print (" nextAction: " , next_action .at )
22+ print (" nextAction: " , script . actions [ next_action ] .at )
2323 else
2424 print (" nextAction: nil" )
2525 end
2626
2727 local command = ' "'
2828 .. pythonFunscriptGenerator
2929 .. ' " --generator -s '
30- .. ( next_action == nil and tostring (currentTimeMs ) or tostring (currentTimeMs ).. ' -e ' .. tostring (next_action .at ) )
30+ .. ( next_action == nil and tostring (currentTimeMs ) or tostring (currentTimeMs ).. ' -e ' .. tostring (script . actions [ next_action ] .at ) )
3131 .. ' -i "'
3232 .. video
3333 .. ' " -o "'
You can’t perform that action at this time.
0 commit comments