aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.lua b/main.lua
index f54c673..0f62464 100644
--- a/main.lua
+++ b/main.lua
@@ -42,7 +42,7 @@ local sub_needed = function ()
end
local sub_setup = function ()
- local out, name, path, rc
+ local out, name, path, rc, filesize
mp.osd_message('fetching subtitle')
@@ -61,8 +61,12 @@ local sub_setup = function ()
if not util.file_exists(path) then
name = mp.get_property_native('media-title')
end
+ filesize = mp.get_property_native('file-size')
- rc = opensubtitles.search(path, out, name)
+ rc = opensubtitles.search(path, out, {
+ name = name,
+ filesize = filesize
+ })
if not rc then
rc = subscene.search(path, out, name)
end