mpv apparently always returns 0

This commit is contained in:
Ren Tatsumoto 2020-09-20 03:21:39 +03:00
parent bf83e586be
commit 9dbb699689

View file

@ -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