From: Stephen Seo Date: Thu, 16 Sep 2021 05:46:44 +0000 (+0900) Subject: Minor fix/tweak to display timer output X-Git-Tag: 0.1.0~32 X-Git-Url: https://git.seodisparate.com/stephenseo/server_config?a=commitdiff_plain;h=7a7883d3594a2902ec4d2ef11cae4233f54f825f;p=mpd_info_screen Minor fix/tweak to display timer output --- diff --git a/src/main.rs b/src/main.rs index 1ed7f65..2f0e370 100644 --- a/src/main.rs +++ b/src/main.rs @@ -418,6 +418,9 @@ fn seconds_to_time(seconds: f64) -> String { } else { result = String::new(); } + if new_seconds < 10.0 { + result.push('0'); + } result.push_str(&new_seconds.to_string()); let idx_result = result.find('.'); if let Some(idx) = idx_result {