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: e95afbe21ae8025e1d69cd92900312deb293df58
Parent: 66b19042ab44126ebced8af3c106265cf290320c
Author: Ren Tatsumoto
Date:   Mon, 28 Sep 2020 03:01:09 +0300

update_last_note uses construct_note_fields to make the fields table

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

diff --git a/subs2srs.lua b/subs2srs.lua @@ -348,12 +348,7 @@ local function update_last_note(overwrite) ffmpeg.create_snapshot(snapshot_timestamp, snapshot_filename) ffmpeg.create_audio(sub['start'], sub['end'], audio_filename) - local note_fields = { - [config.sentence_field] = sub['text'], - [config.audio_field] = string.format('[sound:%s]', audio_filename), - [config.image_field] = string.format('<img src="%s" alt="snapshot">', snapshot_filename), - } - + local note_fields = construct_note_fields(sub['text'], snapshot_filename, audio_filename) ankiconnect.append_media(last_note_id, note_fields, overwrite) end