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: 531fa2f1a8a45aeb1cd1e5de9c419be2bf4a27b1
Parent: 08235827d5e318015aab4f0b2e52f17b2211bd2c
Author: Ren Tatsumoto
Date:   Mon,  9 Nov 2020 09:14:37 +0300

allow exporting without subs

Diffstat:
Msubs2srs.lua | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/subs2srs.lua b/subs2srs.lua @@ -317,8 +317,11 @@ local function construct_media_filenames(timings) end local function construct_note_fields(sub_text, snapshot_filename, audio_filename) + if not is_empty(sub_text) then + sub_text = trim(sub_text) + end return { - [config.sentence_field] = trim(sub_text), + [config.sentence_field] = sub_text, [config.image_field] = string.format('<img src="%s" alt="snapshot">', snapshot_filename), [config.audio_field] = string.format('[sound:%s]', audio_filename), }