feat: add -d flag

This commit is contained in:
Tal 2024-10-07 21:32:57 +02:00
parent cc73fa5a37
commit e47ed1da94
2 changed files with 6 additions and 2 deletions

View File

@ -17,10 +17,14 @@ struct Args {
#[clap(long, short)]
minimalist: bool,
/// Whether to start lowfi paused
/// Whether to start lowfi paused.
#[clap(long, short)]
paused: bool,
/// Whether to include ALSA & other logs.
#[clap(long, short)]
debug: bool,
/// The command that was ran.
/// This is [None] if no command was specified.
#[command(subcommand)]

View File

@ -148,7 +148,7 @@ impl Player {
/// but this option is only applicable on Linux, as on MacOS & Windows
/// it will never be silent.
pub async fn new(silent: bool, args: &Args) -> eyre::Result<Self> {
let (_stream, handle) = if silent && cfg!(target_os = "linux") {
let (_stream, handle) = if silent && cfg!(target_os = "linux") && !args.debug {
Self::silent_get_output_stream()?
} else {
OutputStream::try_default()?