| @@ -28,7 +28,7 @@ impl Connection { |
| 28 | 28 | | let mut conn = Client::connect(addrs).unwrap(); |
| 29 | 29 | | |
| 30 | 30 | | let empty_song = Song { |
| 31 | | − | file: "No Song in the Queue".to_string(), |
| 31 | + | file: "No Song playing or in Queue".to_string(), |
| 32 | 32 | | artist: None, |
| 33 | 33 | | title: None, |
| 34 | 34 | | duration: None, |
| @@ -52,7 +52,10 @@ impl Connection { |
| 52 | 52 | | let repeat = status.repeat; |
| 53 | 53 | | let random = status.random; |
| 54 | 54 | | |
| 55 | | − | let current_song = conn.currentsong().unwrap_or_else(|_| Some(empty_song.clone())).unwrap_or_else(|| empty_song); |
| 55 | + | let current_song = conn |
| 56 | + | .currentsong() |
| 57 | + | .unwrap_or_else(|_| Some(empty_song.clone())) |
| 58 | + | .unwrap_or_else(|| empty_song); |
| 56 | 59 | | Ok(Self { |
| 57 | 60 | | conn, |
| 58 | 61 | | songs_filenames, |
| @@ -93,8 +96,12 @@ impl Connection { |
| 93 | 96 | | /// Update status |
| 94 | 97 | | pub fn update_status(&mut self) { |
| 95 | 98 | | let status = self.conn.status().unwrap(); |
| 96 | | − | let empty_song = self.get_song_with_only_filename("No Song in the Queue"); |
| 97 | | − | let current_song = self.conn.currentsong().unwrap_or_else(|_| Some(empty_song.clone())).unwrap_or_else(|| empty_song); |
| 99 | + | let empty_song = self.get_song_with_only_filename("No Song playing or in Queue"); |
| 100 | + | let current_song = self |
| 101 | + | .conn |
| 102 | + | .currentsong() |
| 103 | + | .unwrap_or_else(|_| Some(empty_song.clone())) |
| 104 | + | .unwrap_or_else(|| empty_song); |
| 98 | 105 | | |
| 99 | 106 | | // Playback State |
| 100 | 107 | | match status.state { |