Added rest query to upate youtube-dl
This commit is contained in:
19
Tubio/Updater.cpp
Normal file
19
Tubio/Updater.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "Updater.h"
|
||||
|
||||
std::string Updater::UpdateYoutubeDL()
|
||||
{
|
||||
#ifdef _WIN
|
||||
HRESULT res = URLDownloadToFileA(NULL, "https://yt-dl.org/downloads/latest/youtube-dl.exe", "youtube-dl.exe", 0, NULL);
|
||||
|
||||
if (SUCCEEDED(res))
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "error code: 0x" + (JasonPP::Internal::Helpers::Base10_2_X(res, "0123456789abcdef"));
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
return "not implemented";
|
||||
}
|
||||
Reference in New Issue
Block a user