aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2023-10-01 09:22:32 +0530
committersinanmohd <sinan@sinanmohd.com>2023-10-01 09:34:12 +0530
commit715d6969d8b6094e93d699c08f35fc2b2b110d01 (patch)
treea0815ff89638981fda75e01fe155ad4baa184a56
parent23c203bc8a0ec7bba33a2554a9d03cd7c54bb5fd (diff)
mpv: now works without sub-auto=fuzzy
-rw-r--r--main.lua2
-rw-r--r--server/subscene.lua1
2 files changed, 2 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index dcd70eb..feefa6a 100644
--- a/main.lua
+++ b/main.lua
@@ -1,4 +1,5 @@
local mutil = require 'mp.utils'
+local util = require 'lib/util'
local subscene = require 'server/subscene'
local mkdir = function (path)
@@ -48,6 +49,7 @@ local sub_setup = function ()
mkdir(out)
name = mp.get_property_native('path')
+ name = util.string_rm_vid_ext(name)
out = out .. '/' .. name .. '.srt'
if subscene.search(name, out) then
diff --git a/server/subscene.lua b/server/subscene.lua
index ccd4d9a..027f15a 100644
--- a/server/subscene.lua
+++ b/server/subscene.lua
@@ -180,7 +180,6 @@ end
local search = function (key, out)
local title, id, link, rc
- key = util.string_rm_vid_ext(key)
title, rc = title_search(key)
if not rc then
util.error('err: subscene: title_search')