add: chunk conten_provider for file download
This commit is contained in:
@@ -124,12 +124,21 @@ bool Worker::download(Task& task)
|
||||
args += task.format.value();
|
||||
}
|
||||
|
||||
args += "--restrict-filenames";
|
||||
args += task.url;
|
||||
|
||||
/* ** Download ** */
|
||||
spdlog::debug("youtube-dl {}", fmt::join(args, " "));
|
||||
|
||||
bp::child c("youtube-dl.exe", bp::args(args), bp::std_out > out, bp::std_err > err);
|
||||
#ifdef __linux__
|
||||
constexpr std::string_view youtube_dl = "youtube-dl";
|
||||
#elif _WIN32
|
||||
constexpr std::string_view youtube_dl = "youtube-dl.exe";
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
bp::child c(std::string{youtube_dl}, bp::args(args), bp::std_out > out, bp::std_err > err);
|
||||
|
||||
std::string destination_file;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user