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: a32d005610c8a1976540b0e918fa875e9c08070f
Parent: b8c0723bbba551561d883cbd57d5a11e08671442
Author: Ren Tatsumoto
Date:   Sun,  6 Sep 2020 17:38:39 +0300

first param is unused

Diffstat:
Msubs2srs.lua | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/subs2srs.lua b/subs2srs.lua @@ -144,8 +144,11 @@ local function copy_to_clipboard(text) mp.commandv("run", "sh", toclip_path, text) end -local function set_clipboard(name, sub) - if is_emptystring(sub) then return end +local function set_clipboard(_, sub) + -- roughly called as in fn(name, mp.get_property_string(name)) + if is_emptystring(sub) then + return + end copy_to_clipboard(sub) end @@ -484,7 +487,7 @@ end subs.get_text = function() local text = '' - for index, value in ipairs(subs.list) do + for _, value in ipairs(subs.list) do text = text .. value['text'] end return text