diff options
| author | krolxon <krolyxon@tutanota.com> | 2024-04-28 18:00:26 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2024-04-28 18:00:26 +0530 |
| commit | 7eac9cfbc66c272edaf8c5207b4beaca247d5209 (patch) | |
| tree | 7abeb0d67af880e8ba2db3f8a37ee8c848cdceda /src/connection.rs | |
| parent | 6e631a0520053c7d3435a193f61e89e695c91f08 (diff) | |
minor changes
Diffstat (limited to 'src/connection.rs')
| -rwxr-xr-x | src/connection.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/connection.rs b/src/connection.rs index 2add4e2..a929385 100755 --- a/src/connection.rs +++ b/src/connection.rs @@ -28,7 +28,7 @@ impl Connection { let mut conn = Client::connect(addrs).unwrap(); let empty_song = Song { - file: "No Song in the Queue".to_string(), + file: "No Song playing or in Queue".to_string(), artist: None, title: None, duration: None, @@ -52,7 +52,10 @@ impl Connection { let repeat = status.repeat; let random = status.random; - let current_song = conn.currentsong().unwrap_or_else(|_| Some(empty_song.clone())).unwrap_or_else(|| empty_song); + let current_song = conn + .currentsong() + .unwrap_or_else(|_| Some(empty_song.clone())) + .unwrap_or_else(|| empty_song); Ok(Self { conn, songs_filenames, @@ -93,8 +96,12 @@ impl Connection { /// Update status pub fn update_status(&mut self) { let status = self.conn.status().unwrap(); - let empty_song = self.get_song_with_only_filename("No Song in the Queue"); - let current_song = self.conn.currentsong().unwrap_or_else(|_| Some(empty_song.clone())).unwrap_or_else(|| empty_song); + let empty_song = self.get_song_with_only_filename("No Song playing or in Queue"); + let current_song = self + .conn + .currentsong() + .unwrap_or_else(|_| Some(empty_song.clone())) + .unwrap_or_else(|| empty_song); // Playback State match status.state { |
