summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2020-10-25 21:20:46 +0000
committerRicardo Constantino <wiiaboo@gmail.com>2020-10-27 15:42:39 +0000
commitad1ecd4350efe5580d1b1b56ebb8012df0dd93e6 (patch)
treec382f8f8571742f6765f793ddb2a904c68c6c26b
parent93f84b514a741c2001e6603d0304cd4a6ab63c73 (diff)
downloadmpv-ad1ecd4350efe5580d1b1b56ebb8012df0dd93e6.tar.bz2
mpv-ad1ecd4350efe5580d1b1b56ebb8012df0dd93e6.tar.xz
ytdl_hook: if ytdl not found in config dirs, use ytdl_path as is
-rw-r--r--player/lua/ytdl_hook.lua5
1 files changed, 4 insertions, 1 deletions
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