mirror of https://github.com/mpv-player/mpv
ytdl_hook: if ytdl not found in config dirs, use ytdl_path as is
This commit is contained in:
parent
93f84b514a
commit
ad1ecd4350
|
@ -693,7 +693,10 @@ function run_ytdl_hook(url)
|
||||||
if not (ytdl.searched) then
|
if not (ytdl.searched) then
|
||||||
local exesuf = (package.config:sub(1,1) == '\\') and '.exe' or ''
|
local exesuf = (package.config:sub(1,1) == '\\') and '.exe' or ''
|
||||||
local ytdl_mcd = mp.find_config_file(o.ytdl_path .. exesuf)
|
local ytdl_mcd = mp.find_config_file(o.ytdl_path .. exesuf)
|
||||||
if not (ytdl_mcd == nil) then
|
if ytdl_mcd == nil then
|
||||||
|
msg.verbose("No youtube-dl found with path "..o.ytdl_path..exesuf.." in config directories")
|
||||||
|
ytdl.path = o.ytdl_path
|
||||||
|
else
|
||||||
msg.verbose("found youtube-dl at: " .. ytdl_mcd)
|
msg.verbose("found youtube-dl at: " .. ytdl_mcd)
|
||||||
ytdl.path = ytdl_mcd
|
ytdl.path = ytdl_mcd
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue