Commit: 601303f2b3602a92680b108563c05165d315abe5
Parent: 28918684f39c0efede68f1f5e10fb05bf61c69a5
Author: Ren Tatsumoto
Date: Tue, 17 Nov 2020 16:37:51 +0300
add a helpful message in case a card is added without subs
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -361,10 +361,9 @@ local function export_to_anki(gui)
notify("Nothing to export.", "warn", 1)
return
end
- if is_empty(sub['text']) and not gui then
- sub['text'] = "mpv_" .. os.time()
+ if not gui and is_empty(sub['text']) then
+ sub['text'] = string.format([[<span id="mpv%s">mpvacious wasn't able to grab subtitles</span>]], os.time())
end
-
local snapshot_filename, audio_filename = construct_media_filenames(sub)
local snapshot_time = (sub['start'] + sub['end']) / 2