set last_index
TODO: change check_for_next_playlist position/logic, #140
This commit is contained in:
parent
da1799e704
commit
77358fb140
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1009,7 +1009,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ffplayout"
|
||||
version = "0.10.0"
|
||||
version = "0.10.1"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"crossbeam-channel 0.5.5",
|
||||
|
@ -4,7 +4,7 @@ description = "24/7 playout based on rust and ffmpeg"
|
||||
license = "GPL-3.0"
|
||||
authors = ["Jonathan Baecker jonbae77@gmail.com"]
|
||||
readme = "README.md"
|
||||
version = "0.10.0"
|
||||
version = "0.10.1"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
@ -275,11 +275,11 @@ impl Iterator for CurrentProgram {
|
||||
// On init load, playlist could be not long enough,
|
||||
// so we check if we can take the next playlist already,
|
||||
// or we fill the gap with a dummy.
|
||||
let list_length = self.nodes.lock().unwrap().len();
|
||||
self.current_node = self.nodes.lock().unwrap()[list_length - 1].clone();
|
||||
let last_index = self.nodes.lock().unwrap().len() - 1;
|
||||
self.current_node = self.nodes.lock().unwrap()[last_index].clone();
|
||||
self.check_for_next_playlist();
|
||||
|
||||
let new_node = self.nodes.lock().unwrap()[list_length - 1].clone();
|
||||
let new_node = self.nodes.lock().unwrap()[last_index].clone();
|
||||
let new_length = new_node.begin.unwrap() + new_node.duration;
|
||||
|
||||
if new_length
|
||||
|
Loading…
Reference in New Issue
Block a user