diff --git a/Cargo.lock b/Cargo.lock index 3531e89a..909a5d42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1215,7 +1215,7 @@ checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "ffplayout" -version = "0.24.0-beta4" +version = "0.24.0-rc1" dependencies = [ "actix-files", "actix-multipart", @@ -3681,7 +3681,7 @@ dependencies = [ [[package]] name = "tests" -version = "0.24.0-beta4" +version = "0.24.0-rc1" dependencies = [ "actix-rt", "actix-test", diff --git a/Cargo.toml b/Cargo.toml index 31f62efe..08244c9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["ffplayout", "tests"] resolver = "2" [workspace.package] -version = "0.24.0-beta4" +version = "0.24.0-rc1" license = "GPL-3.0" repository = "https://github.com/ffplayout/ffplayout" authors = ["Jonathan Baecker "] diff --git a/ffplayout/src/main.rs b/ffplayout/src/main.rs index bcfc712c..97abf438 100644 --- a/ffplayout/src/main.rs +++ b/ffplayout/src/main.rs @@ -94,7 +94,12 @@ async fn main() -> std::io::Result<()> { let ip_port = conn.split(':').collect::>(); let addr = ip_port[0]; - let port = ip_port[1].parse::().unwrap(); + let port = ip_port + .get(1) + .ok_or(": needed!") + .map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string()))? + .parse::() + .unwrap(); let controllers = web::Data::from(channel_controllers.clone()); let auth_state = web::Data::new(SseAuthState { uuids: tokio::sync::Mutex::new(HashSet::new()), diff --git a/ffplayout/src/player/utils/folder.rs b/ffplayout/src/player/utils/folder.rs index 0279998d..8a206e4e 100644 --- a/ffplayout/src/player/utils/folder.rs +++ b/ffplayout/src/player/utils/folder.rs @@ -136,7 +136,6 @@ impl Iterator for FolderSource { self.current_node .add_filter(&config, &self.manager.filter_chain); self.current_node.begin = Some(time_in_seconds()); - self.manager.current_index.fetch_add(1, Ordering::SeqCst); Some(self.current_node.clone()) @@ -155,12 +154,14 @@ impl Iterator for FolderSource { self.sort(); } - self.current_node = self.manager.current_list.lock().unwrap()[0].clone(); + self.current_node = match self.manager.current_list.lock().unwrap().first() { + Some(m) => m.clone(), + None => return None, + }; let _ = self.current_node.add_probe(false).ok(); self.current_node .add_filter(&config, &self.manager.filter_chain); self.current_node.begin = Some(time_in_seconds()); - self.manager.current_index.store(1, Ordering::SeqCst); Some(self.current_node.clone())