aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua6
1 files changed, 3 insertions, 3 deletions
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