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: 5638bf44fb82adb9c5b55a6f99afa30a18c16aa5
Parent: 1d73bcfadd825211a1c5a11bedfdfcde4aba11c9
Author: Ren Tatsumoto
Date:   Wed,  2 Dec 2020 01:51:25 +0300

fix filenames

anki doesn't like parentheses anymore after one of the recent updates

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

diff --git a/subs2srs.lua b/subs2srs.lua @@ -280,7 +280,7 @@ local anki_compatible_length do -- Anki forcibly mutilates all filenames longer than 119 bytes when you run `Tools->Check Media...`. local allowed_bytes = 119 - local timestamp_bytes = #'_(99h99m99s999ms-99h99m99s999ms).webp' + local timestamp_bytes = #'_99h99m99s999ms-99h99m99s999ms.webp' local limit_bytes = allowed_bytes - timestamp_bytes anki_compatible_length = function(str) @@ -321,7 +321,7 @@ local function construct_media_filenames(timings) filename = anki_compatible_length(filename) filename = string.format( - '%s_(%s-%s)', + '%s_%s-%s', filename, human_readable_time(timings['start']), human_readable_time(timings['end'])