add: chunk conten_provider for file download

This commit is contained in:
2021-06-03 19:08:39 +02:00
parent 3baf88ba0a
commit e79de5d92e
5 changed files with 45 additions and 13 deletions

View File

@@ -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;