Commit: 4a40a40ff68831b8b97259f9a8e1e2b0237d4aa5
Parent: b730ecd09df6f4b6de8e2200910cfc0caa4006a1
Author: Ren Tatsumoto
Date: Wed, 9 Sep 2020 07:19:17 +0300
call subprocess instead of command_native to imporve readability
Diffstat:
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -401,16 +401,7 @@ ankiconnect.execute = function(request)
return
end
- local args = {'curl', '-s', 'localhost:8765', '-X', 'POST', '-d', request_json}
-
- local ret = mp.command_native{
- name = "subprocess",
- playback_only = false,
- capture_stdout = true,
- args = args
- }
-
- return ret
+ return subprocess { 'curl', '-s', 'localhost:8765', '-X', 'POST', '-d', request_json }
end
ankiconnect.parse_result = function(curl_output)