ytdlp 자동 다운로드 및 업데이트 로직 구현

This commit is contained in:
2025-08-30 02:51:58 +09:00
parent 177221bf73
commit 0bff043d6e
36 changed files with 351 additions and 1625 deletions

35
src/main.cc Normal file
View File

@@ -0,0 +1,35 @@
#include "precomp.h"
#include "utils/console.h"
#include "utils/update_checker.h"
int main(int argc, char* argv[]) {
boost::system::error_code ec;
char buf[16384];
std::string output;
utils::CheckUpdate();
// utils::ExecuteCommand("yt-dlp", {"-U"}, output);
// std::cout << output;
// auto ytdlp_pipe = utils::OpenPipe(
// "yt-dlp", {"-o", "-", "--quiet", "--ignore-errors", "-f", "bestaudio",
// "https://youtu.be/9_bTl2vvYQg?si=IVhvpDhnpPvziwQR"});
// while (true) {
// boost::system::error_code read_ec;
// size_t bytes_read =
// boost::asio::read(ytdlp_pipe, boost::asio::buffer(buf, 16384),
// read_ec);
// if (bytes_read > 0) {
// std::cout.write(buf, bytes_read);
// }
// if (read_ec == boost::asio::error::eof || read_ec) {
// break;
// }
// }
return 0;
}