Mpv没有加载和播放歌词文件,即使它们位于同名但不同.lrc文件扩展名的目录中。我甚至在我的mpv.conf文件中有以下内容
autoload-files=yes
sub-auto=fuzzy发布于 2019-04-04 05:12:17
看起来,即使有这些选项,mpv也不加载歌词(.lrc)文件。我要做的是制作一个小的mpv插件脚本,并把它放在scripts目录中,该目录位于mpv的config目录中。
-- load lrc files
function file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
function GetLrcPath(name)
return name:gsub("(%..+)$", ".lrc")
end
function open_handler()
lrcPath = GetLrcPath(mp.get_property("path"))
if file_exists(lrcPath) then
mp.set_property("options/sub-files", lrcPath)
end
end
mp.register_event("start-file", open_handler)https://unix.stackexchange.com/questions/510422
复制相似问题