diff --git a/lib/src/utils/json_validate.rs b/lib/src/utils/json_validate.rs index 7e0ce2da..38c38913 100644 --- a/lib/src/utils/json_validate.rs +++ b/lib/src/utils/json_validate.rs @@ -13,7 +13,7 @@ use simplelog::*; use crate::filter::FilterType::Audio; use crate::utils::{ - errors::ProcError, is_close, loop_image, sec_to_time, seek_and_length, vec_strings, + errors::ProcError, is_close, is_remote, loop_image, sec_to_time, seek_and_length, vec_strings, JsonPlaylist, Media, OutputMode::Null, PlayerControl, PlayoutConfig, FFMPEG_IGNORE_ERRORS, IMAGE_FORMAT, }; @@ -172,18 +172,20 @@ pub fn validate_playlist( let pos = index + 1; - if item.audio.is_empty() { - if let Err(e) = item.add_probe(false) { + if !is_remote(&item.source) { + if item.audio.is_empty() { + if let Err(e) = item.add_probe(false) { + error!( + "[Validation] Error on position {pos:0>3} {}: {e}", + sec_to_time(begin) + ); + } + } else if let Err(e) = item.add_probe(true) { error!( "[Validation] Error on position {pos:0>3} {}: {e}", sec_to_time(begin) ); } - } else if let Err(e) = item.add_probe(true) { - error!( - "[Validation] Error on position {pos:0>3} {}: {e}", - sec_to_time(begin) - ); } if item.probe.is_some() { diff --git a/lib/src/utils/mod.rs b/lib/src/utils/mod.rs index 159efcb6..bf11aa31 100644 --- a/lib/src/utils/mod.rs +++ b/lib/src/utils/mod.rs @@ -619,7 +619,7 @@ pub fn gen_dummy(config: &PlayoutConfig, duration: f64) -> (String, Vec) // } pub fn is_remote(path: &str) -> bool { - Regex::new(r"^(https?|rtmps?|rtp|rtsp|udp|tcp|srt)://.*") + Regex::new(r"^(https?|rtmps?|rts?p|udp|tcp|srt)://.*") .unwrap() .is_match(&path.to_lowercase()) }