From 049e2e114ec2baf8fe9445ca8d8c06af0a78f94b Mon Sep 17 00:00:00 2001 From: garret Date: Sat, 21 Aug 2021 13:59:03 +0100 Subject: remove log after generating chapters if they've been saved, it's pretty obvious if we've pressed cancel, we probably don't want the chapters --- chapters.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/chapters.lua b/chapters.lua index cbd0837..141ef3f 100644 --- a/chapters.lua +++ b/chapters.lua @@ -7,11 +7,11 @@ language = "eng" language_ietf = "en" function ms_to_human(start) -- From Significance - timecode=math.floor(start/1000) - tc1=math.floor(timecode/60) - tc2=timecode%60 - tc3=start%1000 - tc4="00" + local timecode=math.floor(start/1000) + local tc1=math.floor(timecode/60) + local tc2=timecode%60 + local tc3=start%1000 + local tc4="00" if tc2==60 then tc2=0 tc1=tc1+1 end if tc1>119 then tc1=tc1-120 tc4="02" end if tc1>59 then tc1=tc1-60 tc4="01" end @@ -72,10 +72,8 @@ function main(sub) local chapfile = io.open(path, "w") chapfile:write(chapters) chapfile:close() - aegisub.log("saved to "..path) else - aegisub.log("\n\n") - aegisub.log(chapters) + aegisub.cancel() end end -- cgit v1.2.3-70-g09d2