xmpd/music_mgr/src/main.rs

31 lines
697 B
Rust
Raw Normal View History

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;
#[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;
}