aboutsummaryrefslogtreecommitdiff
path: root/src/connection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection.rs')
-rwxr-xr-xsrc/connection.rs5
1 files changed, 5 insertions, 0 deletions
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(),