caesura 0.30.2

An all-in-one command line tool to transcode FLAC audio files and upload to gazelle based indexers/trackers
Documentation
//! CLI entry point for caesura.

use caesura::{HostBuilder, init_logger};
use log::error;
use std::process::ExitCode;

#[tokio::main]
async fn main() -> ExitCode {
    let host = match HostBuilder::new_cli().build() {
        Ok(host) => host,
        Err(error) => {
            init_logger();
            error!("{error}");
            return ExitCode::FAILURE;
        }
    };
    match host.execute().await {
        Ok(status) => {
            if status {
                ExitCode::SUCCESS
            } else {
                ExitCode::FAILURE
            }
        }
        Err(report) => {
            eprintln!("{report:?}");
            ExitCode::FAILURE
        }
    }
}