Commit: be48256ca2be74df12eb006dbee974f1026effed
Parent: c769aa5a8cbae44353a45eccfd267fcc6c97855d
Author: Ren Tatsumoto
Date: Tue, 8 Sep 2020 07:51:38 +0300
since subprocess is repeated many times, make it a function
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -193,6 +193,15 @@ local function human_readable_time(seconds)
return ret
end
+local function subprocess(args)
+ return mp.command_native {
+ name = "subprocess",
+ playback_only = false,
+ capture_stdout = true,
+ args = args
+ }
+end
+
local function anki_compatible_length(str)
-- anki forcibly mutilates all filenames longer than 64 characters
-- leave 25 characters for the filename