1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 18:51:04 +02:00

Merge pull request #156 from JakeStanger/fix/mpris-visibility

fix(music): showing when no mpris player found
This commit is contained in:
Jake Stanger 2023-05-21 20:57:59 +01:00 committed by GitHub
commit 1f980ca783
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -231,6 +231,16 @@ impl MusicClient for Client {
if let Err(err) = Self::send_update(&player, &self.tx) {
error!("{err:?}");
}
} else {
let status = Status {
playlist_position: 0,
playlist_length: 0,
state: PlayerState::Stopped,
elapsed: None,
duration: None,
volume_percent: 0,
};
send!(self.tx, PlayerUpdate::Update(Box::new(None), status));
}
rx