1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-20 08:11:03 +02:00

fix(music): Handle NoActivePlayer (playerctld) , NoReply, NoMethod, ServiceUnknown DBus errors in mpris.

This commit is contained in:
slowsage 2024-03-03 19:23:39 -05:00
parent 94f7d873f4
commit 180f8748bb
2 changed files with 83 additions and 45 deletions

View file

@ -34,14 +34,15 @@ pub struct Track {
pub cover_path: Option<String>,
}
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Default)]
pub enum PlayerState {
#[default]
Stopped,
Playing,
Paused,
Stopped,
}
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Default)]
pub struct Status {
pub state: PlayerState,
pub volume_percent: Option<u8>,