-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
命令行调用问题 #115
Comments
Because that script need |
识别不了 |
问题出在这里: mpv-config/scripts/history-bookmark.lua Line 152 in 48bce8e
history-bookmark.lua 代码中使用了 utils.join_path 来获取绝对路径,而 utils.join_path 无法正确处理和组合类似 path = utils.join_path(mp.get_property('working-directory'), path:gusb('^%.[\\/]',''))
依赖问题自行解决,这是 mpv 的问题,和此配置无关 |
normalize-path可以解决,但这个命令是近几个月才引入的,旧版本用不了 local utils = require('mp.utils')
print(mp.command_native({'normalize-path', utils.join_path('D:\\dir', '..\\a.mp4')}))
print(mp.command_native({'normalize-path', utils.join_path('D:\\', '.\\a.mp4')})) 甚至可以不用手动拼working-directory |
在提交 d3e1942 中为较新的 mpv 使用 normalize-path 命令处理路径 |
@dyphire 大佬,我今天在处理这个issue的时候,发现normalize函数里这一行好像写错了方法名,不小心把gsub写成了gusb
我粗略搜索了一下,mpv-config项目在以下地方好像都有此问题 [scripts/history-bookmark.lua]( mpv-config/scripts/history-bookmark.lua Line 154 in 0bc026b
mpv-config/scripts/recentmenu.lua Line 181 in 0bc026b
mpv-config/scripts/simplehistory.lua Line 407 in 0bc026b
mpv-config/scripts/simplebookmark.lua Line 437 in 0bc026b
[scripts/smartcopypaste_II.lua]( mpv-config/scripts/smartcopypaste_II.lua Line 436 in 0bc026b
[scripts/playlistmanager.lua]( mpv-config/scripts/playlistmanager.lua Line 350 in 0bc026b
|
第一个问题:
这里提示
Get-Hash
不能识别;第二个问题:
当系统路径中的lua5.4优先使用,会出现调用错误;如果把系统中scoop安装的lua5.4 uninstall,问题不复现,这个要怎么设置mpv调用自己目录下的lua
The text was updated successfully, but these errors were encountered: