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 --- main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 5b84e9e..f0ddf70 100644 --- a/main.lua +++ b/main.lua @@ -41,7 +41,7 @@ local sub_needed = function () end local sub_setup = function () - local out, name + local out, name, path mp.osd_message('fetching subtitle') @@ -54,11 +54,11 @@ local sub_setup = function () end mkdir(out) - name = mp.get_property_native('path'):match('[^/]*$') - name = util.string_rm_vid_ext(name) + path = mp.get_property_native('path') + name = util.string_vid_path_to_name(path) out = out .. '/' .. name .. '.srt' - if subscene.search(name, out) then + if subscene.search(path, out) then mp.commandv('rescan_external_files') mp.osd_message('fetch success') else -- cgit v1.2.3