From 97088211948abc27bf4b49b9f0d091191c6b7661 Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Wed, 29 Dec 2021 12:19:15 +0300 Subject: [PATCH] tweak special chars filter --- videoclip.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/videoclip.lua b/videoclip.lua index ee5b3e2..85d3611 100644 --- a/videoclip.lua +++ b/videoclip.lua @@ -76,7 +76,7 @@ local function remove_text_in_brackets(str) end local function remove_special_characters(str) - return str:gsub('[%c%p%s]', '') + return str:gsub('[%-_]', ' '):gsub('[%c%p]', ''):gsub('%s+', ' ') end local function human_readable_time(seconds) @@ -108,7 +108,7 @@ local function construct_filename() filename = remove_special_characters(filename) filename = string.format( - '%s_(%s-%s)', + '%s (%s-%s)', filename, human_readable_time(main_menu.timings['start']), human_readable_time(main_menu.timings['end']) @@ -496,7 +496,6 @@ function pref_menu:cycle_audio_bitrates() self:update() end - function pref_menu:cycle_formats(config_type) local formats if config_type == 'video_format' then