From c9c0b23d750d6a6320629f2f7b722b1d3b2c1ddf Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 1 Oct 2023 12:54:48 +0530 Subject: lib/util: string_rm_vid_ext -> string_vid_path_to_name --- lib/util.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/util.lua b/lib/util.lua index 2ea4708..f3632f2 100644 --- a/lib/util.lua +++ b/lib/util.lua @@ -43,7 +43,7 @@ local zip_ext_first = function (zip, out) return rc end -local string_rm_vid_ext = function (str) +local string_vid_path_to_name = function (str) local extensions = { "mkv", "mp4", @@ -56,6 +56,7 @@ local string_rm_vid_ext = function (str) "3gp" } + str = str:match('[^/]*$') for _, ext in ipairs(extensions) do str = str:gsub('.' .. ext, '') end @@ -126,7 +127,7 @@ return { table_print = table_print, table_match_or_any = table_match_or_any, zip_ext_first = zip_ext_first, - string_rm_vid_ext = string_rm_vid_ext, + string_vid_path_to_name = string_vid_path_to_name, opensubtitles_hash = opensubtitles_hash, error = error, } -- cgit v1.2.3