format float

This commit is contained in:
jb-alvarado 2024-04-10 16:49:31 +02:00
parent 496cd44c42
commit 1924392ce2

@ -217,18 +217,16 @@ impl CurrentProgram {
// On init or reload we need to seek for the current clip. // On init or reload we need to seek for the current clip.
fn get_current_clip(&mut self) { fn get_current_clip(&mut self) {
let mut time_sec = self.get_current_time(); let mut time_sec = self.get_current_time();
let shift = self.playout_stat.time_shift.lock().unwrap(); let shift = *self.playout_stat.time_shift.lock().unwrap();
if *self.playout_stat.current_date.lock().unwrap() if *self.playout_stat.current_date.lock().unwrap()
== *self.playout_stat.date.lock().unwrap() == *self.playout_stat.date.lock().unwrap()
&& *shift != 0.0 && shift != 0.0
{ {
info!("Shift playlist start for <yellow>{}</> seconds", *shift); info!("Shift playlist start for <yellow>{shift:.3}</> seconds");
time_sec += *shift; time_sec += shift;
} }
drop(shift);
if self.config.playlist.infinit if self.config.playlist.infinit
&& self.json_playlist.length.unwrap() < 86400.0 && self.json_playlist.length.unwrap() < 86400.0
&& time_sec > self.json_playlist.length.unwrap() + self.start_sec && time_sec > self.json_playlist.length.unwrap() + self.start_sec