Skip to content

Commit eee946e

Browse files
committed
YT_DLP: оставляем только актуальное имя файлв "yt-dlp.exe" для 64-битных Windows, и "yt-dlp_x86.exe" для 32-битных Windows.
1 parent 57630d5 commit eee946e

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/apps/mplayerc/AppSettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ void CAppSettings::ResetSettings()
800800
strLastOpenFilterDir.Empty();
801801

802802
bYdlEnable = false;
803-
strYdlExePath = L"yt-dlp.exe";
803+
strYdlExePath = DEFAULT_YTDLP_EXE;
804804
iYdlVcodec = YT_DLP::vcodec_vp9;
805805
iYdlAcodec = YT_DLP::acodec_opus;
806806
iYdlMaxHeight = 720;

src/apps/mplayerc/AppSettings.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ enum MCE_RAW_INPUT {
174174
#define DEFAULT_JUMPDISTANCE_2 5000
175175
#define DEFAULT_JUMPDISTANCE_3 20000
176176

177+
#ifdef _WIN64
178+
#define DEFAULT_YTDLP_EXE L"yt-dlp.exe"
179+
#else
180+
#define DEFAULT_YTDLP_EXE L"yt-dlp_x86.exe"
181+
#endif
182+
177183
enum dvstype {
178184
DVS_HALF,
179185
DVS_NORMAL,

src/apps/mplayerc/PPageYouTube.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ BOOL CPPageYoutube::OnInitDialog()
157157

158158
was_added = false;
159159
LPCWSTR ydl_filenames[] = {
160-
L"yt-dlp.exe",
161-
L"yt-dlp_min.exe",
160+
DEFAULT_YTDLP_EXE,
162161
};
163162
for (auto& ydl_filename : ydl_filenames) {
164163
m_cbYDLExePath.AddString(ydl_filename);
@@ -300,11 +299,11 @@ void CPPageYoutube::OnBnClickedDefault()
300299

301300
CStringW ydl_path;
302301
m_cbYDLExePath.GetWindowTextW(ydl_path);
303-
if (ydl_path != L"yt-dlp.exe") {
302+
if (ydl_path != DEFAULT_YTDLP_EXE) {
304303
// reset m_cbYDLExePath only if the path is not found
305304
ydl_path = GetFullExePath(ydl_path, true);
306305
if (ydl_path.IsEmpty()) {
307-
m_cbYDLExePath.SelectString(0, L"yt-dlp.exe");
306+
m_cbYDLExePath.SelectString(0, DEFAULT_YTDLP_EXE);
308307
}
309308
}
310309

0 commit comments

Comments
 (0)