Restart steam option (#82)

Adds options to start and stop steam when importing
This commit is contained in:
Philip Kristoffersen
2022-04-15 09:38:43 +02:00
committed by GitHub
parent 9396b06765
commit fcc3a4abc3
9 changed files with 110 additions and 7 deletions
+7
View File
@@ -20,10 +20,17 @@ use std::error::Error;
#[cfg(not(feature = "ui"))]
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let settings = settings::Settings::new()?;
if settings.steam.stop_steam{
crate::steam::ensure_steam_stopped();
}
settings::Settings::write_config_if_missing();
let usersinfo = sync::run_sync(&settings,&mut None).unwrap();
sync::download_images(&settings,&usersinfo,&mut None).await;
if settings.steam.start_steam{
crate::steam::ensure_steam_started(&settings.steam);
}
Ok(())
}