diff options
author | sinanmohd <sinan@sinanmohd.com> | 2023-10-01 12:54:48 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2023-10-01 13:02:32 +0530 |
commit | c9c0b23d750d6a6320629f2f7b722b1d3b2c1ddf (patch) | |
tree | 693c3b59e58a7533a9d49598a4886b1ce0809446 /main.lua | |
parent | 861453ac25d3a5476dd8dc0e1bbe48874d8567af (diff) |
lib/util: string_rm_vid_ext -> string_vid_path_to_name
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |