From: Stephen Seo Date: Thu, 16 Sep 2021 05:48:03 +0000 (+0900) Subject: Fix/tweak display time output X-Git-Tag: 0.1.0~31 X-Git-Url: https://git.seodisparate.com/stephenseo/server_config?a=commitdiff_plain;h=1e461e96eb3ed24e0ba55d9c6da8efb7d62ef95f;p=mpd_info_screen Fix/tweak display time output --- diff --git a/src/main.rs b/src/main.rs index 2f0e370..c3f8853 100644 --- a/src/main.rs +++ b/src/main.rs @@ -418,7 +418,7 @@ fn seconds_to_time(seconds: f64) -> String { } else { result = String::new(); } - if new_seconds < 10.0 { + if new_seconds < 10.0 && seconds >= 0.0 { result.push('0'); } result.push_str(&new_seconds.to_string());