Aleksoid1978 / MPC-BE

MPC-BE – универсальный проигрыватель аудио и видеофайлов для операционной системы Windows.
GNU General Public License v3.0
1.88k stars 83 forks source link

youtube-dl wrong command #411

Closed Jotaro31 closed 3 months ago

Jotaro31 commented 3 months ago

When attempting to use youtube-dl, an error appears with error: no such option: --no-check-certificates.

Should propably be

diff --git a/src/apps/mplayerc/PlayerYouTubeDL.cpp b/src/apps/mplayerc/PlayerYouTubeDL.cpp
index 230d08919..2cef6e814 100644
--- a/src/apps/mplayerc/PlayerYouTubeDL.cpp
+++ b/src/apps/mplayerc/PlayerYouTubeDL.cpp
@@ -75,7 +75,7 @@ namespace YoutubeDL

        PROCESS_INFORMATION proc_info = {};
        CStringW args;
-       args.Format(LR"(%s -j --all-subs --sub-format vtt --no-check-certificates "%s")", ydl_path.GetString(), url.GetString());
+       args.Format(LR"(%s -j --all-subs --sub-format vtt --no-check-certificate "%s")", ydl_path.GetString(), url.GetString());

        const BOOL bSuccess = CreateProcessW(
            nullptr, args.GetBuffer(), nullptr, nullptr, TRUE, 0,

MPC-BE Version: 1.6.11 youtube-dl Versions checked: 2021.12.17, 2024.03.13 nightly

See /youtube_dl/init.py for opts reference

v0lt commented 3 months ago

I run the command yt-dlp.exe --help > yt-dlp_help.txt

I open the resulting text file and see there

    --no-check-certificates         Suppress HTTPS certificate validation
Jotaro31 commented 3 months ago

I run the command yt-dlp.exe --help > yt-dlp_help.txt

I open the resulting text file and see there

    --no-check-certificates         Suppress HTTPS certificate validation

You're right, it works with yt-dlp. The settings menu seems to imply it can use either youtube-dl or yt-dlp.

I guess if feasible, use different args depending on the exe selection, or just drop support for youtube-dl.

v0lt commented 3 months ago

Please check MPC-BE 1.6.11.229 or later.

Jotaro31 commented 3 months ago

works like a charm, very nice!