diff --git a/src/client/app.rs b/src/client/app.rs index b9cd085..cb4d1e6 100644 --- a/src/client/app.rs +++ b/src/client/app.rs @@ -106,18 +106,28 @@ pub struct TrackMetadata { pub duration: Option, } -#[derive(Default)] pub struct PlayerState { pub currently_playing: Option, pub is_playing: bool, pub time_ratio: f64, } +impl Default for PlayerState { + fn default() -> Self { + Self { + currently_playing: None, + is_playing: false, + time_ratio: 0.0, + } + } +} + impl PlayerState { pub fn play(&mut self, path: &str) { self.currently_playing = Some(path.to_string()); self.is_playing = true; self.time_ratio = 0.0; + // TODO: Handle audio } pub fn toggle_pause(&mut self) {