2024-04-17 12:21:53 +00:00
|
|
|
use config::ConfigWrapper;
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Possibly use https://docs.rs/ytextract/latest/ytextract/ instead of ytdlp
|
|
|
|
mod manifest;
|
|
|
|
mod logger;
|
|
|
|
mod downloader;
|
|
|
|
mod util;
|
|
|
|
mod commands;
|
|
|
|
mod prompt;
|
|
|
|
mod config;
|
|
|
|
mod constants;
|
2024-04-22 16:14:48 +00:00
|
|
|
mod process_manager;
|
2024-04-17 12:21:53 +00:00
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
async fn main() {
|
|
|
|
let Ok(cfg) = ConfigWrapper::parse().await else {
|
|
|
|
return;
|
|
|
|
};
|
|
|
|
|
2024-04-18 22:21:03 +00:00
|
|
|
let mut manifest = match manifest::Manifest::load_new(&cfg.cli.manifest.clone().into_std_path_buf()) {
|
2024-04-17 12:21:53 +00:00
|
|
|
Ok(m) => m,
|
|
|
|
Err(e) => {
|
|
|
|
log::error!("Failed to parse manifest file {}: {e}", cfg.cli.manifest);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
let _ = commands::command_run(&cfg, &mut manifest).await;
|
|
|
|
}
|