mirror of
https://github.com/HappyTanuki/BumbleCee.git
synced 2025-10-26 09:55:14 +00:00
ytdlp 자동 다운로드 및 업데이트 로직 구현
This commit is contained in:
35
src/main.cc
Normal file
35
src/main.cc
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user