From 0d405cf2211666d3cede129046f5cde197848f78 Mon Sep 17 00:00:00 2001 From: Henrik Friedrichsen Date: Mon, 24 May 2021 21:03:25 +0200 Subject: [PATCH] Print Spotify connection message only once To avoid the terminal output getting garbled when ncspot is reconnecting --- src/main.rs | 1 + src/spotify.rs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f21ca87..84ec762 100644 --- a/src/main.rs +++ b/src/main.rs @@ -168,6 +168,7 @@ async fn main() { let event_manager = EventManager::new(cursive.cb_sink().clone()); + println!("Connecting to Spotify.."); let spotify = spotify::Spotify::new(event_manager.clone(), credentials, cfg.clone()); let queue = Arc::new(queue::Queue::new(spotify.clone(), cfg.clone())); diff --git a/src/spotify.rs b/src/spotify.rs index 67f2613..4998c4a 100644 --- a/src/spotify.rs +++ b/src/spotify.rs @@ -178,7 +178,6 @@ impl Spotify { ) .expect("Could not create cache"); debug!("opening spotify session"); - println!("Connecting to Spotify.."); Session::connect(session_config, credentials, Some(cache)).await }