Merge pull request #156 from JakeStanger/fix/mpris-visibility
fix(music): showing when no mpris player found
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user