From 5f5adabdeec7f2bf0897ef81fbc7e04dfed4b015 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 7 Oct 2023 19:18:20 +0530 Subject: lib/util: init file_exists --- main.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index f89b8fd..f54c673 100644 --- a/main.lua +++ b/main.lua @@ -58,11 +58,11 @@ local sub_setup = function () path = mp.get_property_native('path') out = out .. '/' .. util.string_vid_path_to_name(path) .. '.srt' - if path:find('https?://') then + if not util.file_exists(path) then name = mp.get_property_native('media-title') - else - rc = opensubtitles.search(path, out) end + + rc = opensubtitles.search(path, out, name) if not rc then rc = subscene.search(path, out, name) end -- cgit v1.2.3