From dc3f561de36fdfc283ebe0b6cf49f09f3bdc9282 Mon Sep 17 00:00:00 2001 From: krolxon Date: Sat, 1 Jun 2024 15:58:53 +0530 Subject: fix #8 --- src/connection.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/connection.rs') diff --git a/src/connection.rs b/src/connection.rs index 7df0517..d6958c2 100755 --- a/src/connection.rs +++ b/src/connection.rs @@ -18,6 +18,7 @@ pub struct Connection { pub random: bool, pub current_song: Song, pub stats: mpd::Stats, + pub status: mpd::Status, } impl Connection { @@ -61,6 +62,7 @@ impl Connection { random, current_song, stats, + status, }) } @@ -90,6 +92,9 @@ impl Connection { .unwrap_or(empty_song); let stats = self.conn.stats().unwrap_or_default(); + // Status + self.status = status.clone(); + // Playback State self.state = match status.state { State::Stop => "Stopped".to_string(), -- cgit v1.2.3