From 2a4897569e68d67012113c87551ce32e98738874 Mon Sep 17 00:00:00 2001 From: Lauri Gates Date: Sun, 28 Jun 2020 09:40:52 +0300 Subject: [PATCH] Fix loading total volume from default volumes The setting was written with the incorrect name, which caused it not to load at all. --- src/sound/sound_manager.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/sound_manager.rs b/src/sound/sound_manager.rs index 664d111..ac67051 100644 --- a/src/sound/sound_manager.rs +++ b/src/sound/sound_manager.rs @@ -655,7 +655,7 @@ impl SoundManager { /// Write the current slider values into the soundsense-rs/default-volumes.ini file. pub fn set_current_volumes_as_default(&self, mut file: File) -> Result<()> { use std::io::Write; - writeln!(&mut file, "all={}", (self.total_volume.get()*100.0) as u32)?; + writeln!(&mut file, "total={}", (self.total_volume.get()*100.0) as u32)?; for (channel_name, channel) in self.channels.iter() { writeln!(&mut file, "{}={}", channel_name, (channel.get_local_volume()*100.0) as u32)?; } @@ -747,4 +747,4 @@ fn parse_playlist(path: &Path) -> Result> { } } Ok(path_vec) -} \ No newline at end of file +}