diff options
author | sinanmohd <sinan@sinanmohd.com> | 2023-10-05 17:45:01 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2023-10-05 17:45:01 +0530 |
commit | 048496da427917056c3331e3482590e59955b685 (patch) | |
tree | f6611599d101351181c3c4af537a833ccb581272 /main.lua | |
parent | f0d0eded1f9b7f2a244d414d09ad97e197601fab (diff) |
mpv: use media-title as key for http streams
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -56,14 +56,15 @@ local sub_setup = function () mkdir(out) path = mp.get_property_native('path') - name = util.string_vid_path_to_name(path) - out = out .. '/' .. name .. '.srt' + out = out .. '/' .. util.string_vid_path_to_name(path) .. '.srt' - if not path:find('https?://') then + if path:find('https?://') then + name = mp.get_property_native('media-title') + else rc = opensubtitles.search(path, out) end if not rc then - rc = subscene.search(path, out) + rc = subscene.search(path, out, name) end if rc then |