diff options
author | garret <garret@airmail.cc> | 2021-08-21 13:59:03 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2021-08-21 13:59:03 +0100 |
commit | 049e2e114ec2baf8fe9445ca8d8c06af0a78f94b (patch) | |
tree | cd223fd7dcc6ffa3cfa14cdda901d6f37bed1772 /chapters.lua | |
parent | 4f7469e56a07250d1e044cf940b44eaf612d3282 (diff) | |
download | aegisub-scripts-049e2e114ec2baf8fe9445ca8d8c06af0a78f94b.tar.gz aegisub-scripts-049e2e114ec2baf8fe9445ca8d8c06af0a78f94b.tar.bz2 aegisub-scripts-049e2e114ec2baf8fe9445ca8d8c06af0a78f94b.zip |
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
Diffstat (limited to 'chapters.lua')
-rw-r--r-- | chapters.lua | 14 |
1 files 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("<!-- Chapters not saved, logging here - select everything below this message and copy+paste into an xml file -->\n\n") - aegisub.log(chapters) + aegisub.cancel() end end |