diff --git a/alliumd/src/alliumd.rs b/alliumd/src/alliumd.rs index ee21d320..d81934d4 100644 --- a/alliumd/src/alliumd.rs +++ b/alliumd/src/alliumd.rs @@ -248,6 +248,7 @@ impl AlliumD { self.main.wait().await?; } self.save()?; + self.update_play_time()?; self.platform.shutdown()?; Ok(()) } diff --git a/common/src/platform/miyoo/mod.rs b/common/src/platform/miyoo/mod.rs index 2a4658b9..40e5268b 100644 --- a/common/src/platform/miyoo/mod.rs +++ b/common/src/platform/miyoo/mod.rs @@ -5,6 +5,7 @@ mod screen; mod volume; use std::fmt; +use std::os::unix::process::CommandExt; use std::process::Command; use anyhow::Result; @@ -71,11 +72,10 @@ impl Platform for MiyooPlatform { fn shutdown(&self) -> Result<()> { #[cfg(unix)] { - self.update_play_time()?; std::process::Command::new("sync").spawn()?; match self.model { MiyooDeviceModel::Miyoo283 => { - std::process::Command::new("reboot").exec()?; + std::process::Command::new("reboot").exec(); } MiyooDeviceModel::Miyoo354 => { std::process::Command::new("poweroff").exec();