From e47ed1da94f0a07fa7295f995c9c1c37f66d0df4 Mon Sep 17 00:00:00 2001 From: Tal <83217276+talwat@users.noreply.github.com> Date: Mon, 7 Oct 2024 21:32:57 +0200 Subject: [PATCH] feat: add -d flag --- src/main.rs | 6 +++++- src/player.rs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 610eab9..f012407 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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)] diff --git a/src/player.rs b/src/player.rs index dc0a231..89e07bc 100644 --- a/src/player.rs +++ b/src/player.rs @@ -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 { - 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()?