mpv2oboeru

mpv helpers to create flashcards from movies and TV shows
git clone anongit@rnpnr.xyz:mpv2oboeru.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 53d853ac38f9237151b92967efb65d950bde852f
Parent: 3fdba96ea1687be39bbb87aba247ad414b8d9d46
Author: Ren Tatsumoto
Date:   Sun,  4 Oct 2020 15:07:43 +0300

reformat time parts

Diffstat:
Msubs2srs.lua | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/subs2srs.lua b/subs2srs.lua @@ -207,12 +207,12 @@ local function human_readable_time(seconds) return 'empty' end - local parts = {} - - parts.h = math.floor(seconds / 3600) - parts.m = math.floor(seconds / 60) % 60 - parts.s = math.floor(seconds % 60) - parts.ms = math.floor((seconds * 1000) % 1000) + local parts = { + h = math.floor(seconds / 3600), + m = math.floor(seconds / 60) % 60, + s = math.floor(seconds % 60), + ms = math.floor((seconds * 1000) % 1000), + } local ret = string.format("%02dm%02ds%03dms", parts.m, parts.s, parts.ms)