diff --git a/ffplayout-engine/src/input/playlist.rs b/ffplayout-engine/src/input/playlist.rs
index 7caec164..f91fb249 100644
--- a/ffplayout-engine/src/input/playlist.rs
+++ b/ffplayout-engine/src/input/playlist.rs
@@ -93,6 +93,16 @@ impl CurrentProgram {
if let Some(file) = &self.json_playlist.path {
info!("Read playlist: {file}>");
}
+
+ if *self.playout_stat.date.lock().unwrap() != self.json_playlist.date {
+ self.set_status(self.json_playlist.date.clone());
+ }
+
+ self.playout_stat
+ .current_date
+ .lock()
+ .unwrap()
+ .clone_from(&self.json_playlist.date);
}
self.player_control
@@ -179,6 +189,12 @@ impl CurrentProgram {
}
fn set_status(&mut self, date: String) {
+ if *self.playout_stat.date.lock().unwrap() != date
+ && *self.playout_stat.time_shift.lock().unwrap() != 0.0
+ {
+ info!("Reset playout status");
+ }
+
self.playout_stat
.current_date
.lock()
@@ -232,10 +248,7 @@ impl CurrentProgram {
let mut time_sec = self.get_current_time();
let shift = *self.playout_stat.time_shift.lock().unwrap();
- if *self.playout_stat.current_date.lock().unwrap()
- == *self.playout_stat.date.lock().unwrap()
- && shift != 0.0
- {
+ if shift != 0.0 {
info!("Shift playlist start for {shift:.3}> seconds");
time_sec += shift;
}
diff --git a/ffplayout-engine/src/main.rs b/ffplayout-engine/src/main.rs
index 547a9b74..386194d0 100644
--- a/ffplayout-engine/src/main.rs
+++ b/ffplayout-engine/src/main.rs
@@ -1,6 +1,6 @@
use std::{
fs::{self, File},
- path::PathBuf,
+ path::Path,
process::exit,
sync::{atomic::AtomicBool, Arc, Mutex},
thread,
@@ -47,7 +47,7 @@ struct StatusData {
fn status_file(stat_file: &str, playout_stat: &PlayoutStatus) -> Result<(), ProcError> {
debug!("Start ffplayout v{VERSION}, status file path: {stat_file}>");
- if !PathBuf::from(stat_file).exists() {
+ if !Path::new(stat_file).exists() {
let data = json!({
"time_shift": 0.0,
"date": String::new(),
diff --git a/ffplayout-engine/src/output/mod.rs b/ffplayout-engine/src/output/mod.rs
index 81429f74..552a728b 100644
--- a/ffplayout-engine/src/output/mod.rs
+++ b/ffplayout-engine/src/output/mod.rs
@@ -251,7 +251,7 @@ pub fn player(
};
}
- debug!("Out of source loop");
+ trace!("Out of source loop");
sleep(Duration::from_secs(1));
diff --git a/ffplayout-frontend b/ffplayout-frontend
index 4fca1f26..d07e284b 160000
--- a/ffplayout-frontend
+++ b/ffplayout-frontend
@@ -1 +1 @@
-Subproject commit 4fca1f262fbfbdaa618caeb1871e547a16770764
+Subproject commit d07e284ba71f13a804ef7cbc438c451bcbc8824b