use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error("no players found")]
    NoPlayersFound,
    #[error("player not found: {0}")]
    PlayerNotFound(String),
    #[error("d-bus error: {0}")]
    DBus(#[from] zbus::Error),
    #[error("d-bus fdo error: {0}")]
    Fdo(#[from] zbus::fdo::Error),
    #[error("unsupported operation")]
    Unsupported,
    #[error("invalid playback status: {0}")]
    InvalidPlaybackStatus(String),
}

pub type Result<T> = std::result::Result<T, Error>;
