From ad1ecd4350efe5580d1b1b56ebb8012df0dd93e6 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Sun, 25 Oct 2020 21:20:46 +0000 Subject: ytdl_hook: if ytdl not found in config dirs, use ytdl_path as is --- player/lua/ytdl_hook.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index afe284c9da..e9a7b3aac7 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -693,7 +693,10 @@ function run_ytdl_hook(url) if not (ytdl.searched) then local exesuf = (package.config:sub(1,1) == '\\') and '.exe' or '' 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) ytdl.path = ytdl_mcd end -- cgit v1.2.3