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: 5592b726e88e70ca1a9e77eb04dee0a895875c24
Parent: 679f642c4bfd61527b95ed449fb984398292454c
Author: Ren Tatsumoto
Date:   Sat, 26 Sep 2020 22:49:37 +0300

a functon that joins media fields

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

diff --git a/subs2srs.lua b/subs2srs.lua @@ -347,6 +347,23 @@ local function get_empty_timings() } end +local function join_media_fields(note1, note2) + if note2 == nil then + goto ret + end + + if note2[config.audio_field] then + note1[config.audio_field] = note2[config.audio_field] .. note1[config.audio_field] + end + + if note2[config.image_field] then + note1[config.image_field] = note2[config.image_field] .. note1[config.image_field] + end + + :: ret :: + return note1 +end + ------------------------------------------------------------ -- ffmpeg helper