xmpd/music_mgr/src/main.rs

31 lines
654 B
Rust
Raw Normal View History

use config::ConfigWrapper;
2024-04-07 22:07:56 +00:00
// TODO: Possibly use https://docs.rs/ytextract/latest/ytextract/ instead of ytdlp
2024-04-08 00:03:35 +00:00
mod manifest;
mod logger;
mod downloader;
mod util;
2024-04-12 21:02:42 +00:00
mod commands;
mod prompt;
mod config;
mod constants;
2024-04-07 22:07:56 +00:00
2024-04-08 00:03:35 +00:00
#[tokio::main]
async fn main() {
let Ok(cfg) = ConfigWrapper::parse().await else {
return;
};
2024-04-12 21:02:42 +00:00
let mut manifest = match manifest::Manifest::from_path(&cfg.cli.manifest.as_std_path()) {
2024-04-08 00:03:35 +00:00
Ok(m) => m,
Err(e) => {
log::error!("Failed to parse manifest file {}: {e}", cfg.cli.manifest);
2024-04-08 00:03:35 +00:00
return;
}
};
2024-04-12 21:02:42 +00:00
let _ = commands::command_run(&cfg, &mut manifest).await;
2024-04-07 22:07:56 +00:00
}