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: 90cad36e4bf14d6d75f394854544ce509f8f279c
Parent: 6f898ad109acd25d3565b4f902d2654da8ec017a
Author: Ren Tatsumoto
Date:   Mon, 14 Dec 2020 18:56:39 +0300

make a func for making forvo filenames

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

diff --git a/subs2srs.lua b/subs2srs.lua @@ -568,6 +568,10 @@ do end end + local function make_forvo_filename(word) + return string.format('forvo_%s%s', platform.windows and os.time() or word, config.audio_extension) + end + local function get_forvo_pronunciation(word) local audio_url = get_pronunciation_url(word) @@ -576,7 +580,7 @@ do return end - local filename = string.format('forvo_%s%s', platform.windows and os.time() or word, config.audio_extension) + local filename = make_forvo_filename(word) local tmp_filepath = utils.join_path(platform.tmp_dir(), filename) local result