summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/options.rst2
-rw-r--r--player/lua/ytdl_hook.lua6
2 files changed, 4 insertions, 4 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 0be7b8c718..9a6d18cff3 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -945,7 +945,7 @@ Program Behavior
paths should be separated by : on Unix and ; on Windows. mpv looks in
order for the configured paths in PATH and in mpv's config directory.
The defaults are "yt-dlp", "yt-dlp_x86" and "youtube-dl". On Windows
- the suffix extension ".exe" is always appended.
+ the suffix extension is not necessary, but only ".exe" is acceptable.
.. admonition:: Why do the option names mix ``_`` and ``-``?
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 6a3c6d8530..7e456b9ec7 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -834,7 +834,7 @@ function run_ytdl_hook(url)
for _, path in pairs(ytdl.paths_to_search) do
-- search for youtube-dl in mpv's config dir
- local exesuf = platform_is_windows() and ".exe" or ""
+ local exesuf = platform_is_windows() and not path:lower():match("%.exe$") and ".exe" or ""
local ytdl_cmd = mp.find_config_file(path .. exesuf)
if ytdl_cmd then
msg.verbose("Found youtube-dl at: " .. ytdl_cmd)
@@ -847,9 +847,9 @@ function run_ytdl_hook(url)
command[1] = path
result = exec(command)
if result.error_string == "init" then
- msg.verbose("youtube-dl with path " .. path .. exesuf .. " not found in PATH or not enough permissions")
+ msg.verbose("youtube-dl with path " .. path .. " not found in PATH or not enough permissions")
else
- msg.verbose("Found youtube-dl with path " .. path .. exesuf .. " in PATH")
+ msg.verbose("Found youtube-dl with path " .. path .. " in PATH")
ytdl.path = path
break
end