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:
commit
1f980ca783
1 changed files with 10 additions and 0 deletions
|
@ -231,6 +231,16 @@ impl MusicClient for Client {
|
||||||
if let Err(err) = Self::send_update(&player, &self.tx) {
|
if let Err(err) = Self::send_update(&player, &self.tx) {
|
||||||
error!("{err:?}");
|
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
|
rx
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue