This commit is contained in:
psykose 2024-11-19 12:48:46 +01:00
parent 6f925f9922
commit f7033ffb5d
Signed by: psykose
SSH key fingerprint: SHA256:pRMVjV3kRB6zl+wNx+sV8KoMnPqQAW6v8dNCxsCGZv8

View file

@ -333,7 +333,7 @@ impl Player {
// FIXME: https://github.com/dbus2/zbus/issues/992
#[zbus(property)]
fn shuffle(&self) -> zbus::fdo::Result<bool> {
Err(zbus::fdo::Error::NotSupported("Shuffle".into()).into())
Err(zbus::fdo::Error::NotSupported("Shuffle".into()))
}
#[zbus(property)]
@ -356,7 +356,8 @@ impl Player {
#[tracing::instrument(skip(self), parent = None, target = "audrey::mpris", level = Level::DEBUG, ret)]
fn set_volume(&self, volume: f64) -> zbus::Result<()> {
let corrected_volume = (volume.clamp(0.0, 1.0) * 100.0) as i64;
Ok(self.window().set_volume(corrected_volume))
self.window().set_volume(corrected_volume);
Ok(())
}
#[zbus(property(emits_changed_signal = "false"))]