Skip to content

Commit

Permalink
make a func for making forvo filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsumoto-ren committed Dec 14, 2020
1 parent 6f898ad commit 90cad36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion subs2srs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down

0 comments on commit 90cad36

Please sign in to comment.