aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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')