get right start time, in infinit mode, hide delete button only on small screen width
This commit is contained in:
parent
2257203118
commit
608e449d5b
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -2924,9 +2924,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.35"
|
||||
version = "0.38.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f"
|
||||
checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"errno",
|
||||
@ -3842,9 +3842,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio-stream"
|
||||
version = "0.1.15"
|
||||
version = "0.1.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af"
|
||||
checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"pin-project-lite",
|
||||
|
@ -264,7 +264,7 @@ impl ChannelManager {
|
||||
self.run_count.fetch_sub(1, Ordering::SeqCst);
|
||||
let pool = self.db_pool.clone().unwrap();
|
||||
let channel_id = self.channel.lock().unwrap().id;
|
||||
debug!(target: Target::all(), channel = channel_id; "Stop all child processes from channel {channel_id}");
|
||||
debug!(target: Target::all(), channel = channel_id; "Deactivate playout and stop all child processes from channel: <yellow>{channel_id}</>");
|
||||
|
||||
if let Err(e) = handles::update_player(&pool, channel_id, false).await {
|
||||
error!(target: Target::all(), channel = channel_id; "Unable write to player status: {e}");
|
||||
@ -273,7 +273,7 @@ impl ChannelManager {
|
||||
for unit in [Decoder, Encoder, Ingest] {
|
||||
if let Err(e) = self.stop(unit) {
|
||||
if !e.to_string().contains("exited process") {
|
||||
error!("{e}")
|
||||
error!(target: Target::all(), channel = channel_id; "{e}")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -286,7 +286,7 @@ impl ChannelManager {
|
||||
self.ingest_is_running.store(false, Ordering::SeqCst);
|
||||
self.run_count.fetch_sub(1, Ordering::SeqCst);
|
||||
let channel_id = self.channel.lock().unwrap().id;
|
||||
debug!(target: Target::all(), channel = channel_id; "Stop all child processes from channel {channel_id}");
|
||||
debug!(target: Target::all(), channel = channel_id; "Stop all child processes from channel: <yellow>{channel_id}</>");
|
||||
|
||||
for unit in [Decoder, Encoder, Ingest] {
|
||||
if let Err(e) = self.stop(unit) {
|
||||
|
@ -356,12 +356,23 @@ impl CurrentProgram {
|
||||
}
|
||||
|
||||
fn recalculate_begin(&mut self, extend: bool) {
|
||||
debug!(target: Target::file_mail(), channel = self.id; "Infinit playlist reaches end, recalculate clip begins.");
|
||||
debug!(target: Target::file_mail(), channel = self.id; "Infinit playlist reaches end, recalculate clip begins. Extend: <yellow>{extend}</>");
|
||||
|
||||
let mut time_sec = time_in_seconds();
|
||||
|
||||
if extend {
|
||||
time_sec = self.start_sec + self.json_playlist.length.unwrap();
|
||||
// Calculate the elapsed time since the playlist start
|
||||
let elapsed_sec = if time_sec >= self.start_sec {
|
||||
time_sec - self.start_sec
|
||||
} else {
|
||||
time_sec + 86400.0 - self.start_sec
|
||||
};
|
||||
|
||||
// Time passed within the current playlist loop
|
||||
let time_in_current_loop = elapsed_sec % self.json_playlist.length.unwrap();
|
||||
|
||||
// Adjust the start time so that the playlist starts at the correct point in time
|
||||
time_sec = time_sec - time_in_current_loop;
|
||||
}
|
||||
|
||||
self.json_playlist.start_sec = Some(time_sec);
|
||||
|
2
frontend
2
frontend
@ -1 +1 @@
|
||||
Subproject commit 48f123bf6ad136968495e9e5e22249b8ca5ef192
|
||||
Subproject commit 4511c9c9e11ac623714ee4897b74e030458a255b
|
Loading…
Reference in New Issue
Block a user