From a8745622e0a22539d740a02f647e91d7e8f458c0 Mon Sep 17 00:00:00 2001 From: TheColorman Date: Mon, 19 Jun 2023 16:29:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Moved=20curl=20to=20subprocess?= =?UTF-8?q?=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- videoclip.lua | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/videoclip.lua b/videoclip.lua index 05a2883..cb5fcab 100644 --- a/videoclip.lua +++ b/videoclip.lua @@ -478,18 +478,12 @@ function main_menu:upload_catbox() -- This uses cURL to send a request to the cat-/litterbox API. -- cURL is included on Windows 10 and up, most Linux distributions and macOS. - local r = mp.command_native({ -- This is technically blocking, but I don't think it has any real consequences ..? - name = 'subprocess', - playback_only = false, - capture_stdout = true, - capture_stderr = true, - args = { - os_type == 'windows' and 'curl.exe' or 'curl', '-s', - '-F', 'reqtype=fileupload', - '-F', 'time=' .. config['litterbox_expire'], - '-F', 'fileToUpload=@"' .. outfile .. '"', - endpoint - } + local r = subprocess({ -- This is technically blocking, but I don't think it has any real consequences ..? + os_type == 'windows' and 'curl.exe' or 'curl', '-s', + '-F', 'reqtype=fileupload', + '-F', 'time=' .. config['litterbox_expire'], + '-F', 'fileToUpload=@"' .. outfile .. '"', + endpoint }) -- Exit codes in the range [0, 99] are returned by cURL itself.