diff options
| author | krolxon <krolyxon@tutanota.com> | 2024-06-01 15:58:53 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2024-06-01 15:58:53 +0530 |
| commit | dc3f561de36fdfc283ebe0b6cf49f09f3bdc9282 (patch) | |
| tree | 84dfc38712a631f57450da63351fa946689a4da1 /src/connection.rs | |
| parent | 311cbc26318ef81e1b7c697e11098fb6b642fd2c (diff) | |
fix #8
Diffstat (limited to 'src/connection.rs')
| -rwxr-xr-x | src/connection.rs | 5 |
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(), |
