From 48700c12403ea1fc77d4fa6bd84ce1a208b876b0 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 7 Oct 2023 19:35:23 +0530 Subject: server/opensubtitles: init search_filesize --- main.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'main.lua') 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 -- cgit v1.2.3