Skip to content

Commit

Permalink
ytdl_hook: if ytdl not found in config dirs, use ytdl_path as is
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiaboo committed Oct 27, 2020
1 parent 93f84b5 commit ad1ecd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion player/lua/ytdl_hook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad1ecd4

Please sign in to comment.