From 9dbb69968919bcb6f1426597c43e397e0baffa3f Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Sun, 20 Sep 2020 03:21:39 +0300 Subject: [PATCH] mpv apparently always returns 0 --- videoclip.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/videoclip.lua b/videoclip.lua index 63dbd99..e668604 100644 --- a/videoclip.lua +++ b/videoclip.lua @@ -174,10 +174,10 @@ encoder.create_clip = function(clip_type) ret = encoder.create_audioclip(clip_filename) end - if ret.status == 0 then - mp.osd_message(string.format("Clip saved to %s.", location), 2) - else + if string.match(ret.stdout, "could not open") then mp.osd_message(string.format("Error: couldn't create the clip.\nDoes %s exist?", location), 5) + else + mp.osd_message(string.format("Clip saved to %s.", location), 2) end end