change regex

This commit is contained in:
jb-alvarado 2023-02-03 10:48:56 +01:00
parent 3b61d09809
commit 714442cd59

View File

@ -3,7 +3,7 @@ use simplelog::*;
/// Apply custom filters
pub fn filter_node(filter: &str) -> (String, String) {
let re = Regex::new(r"^;?(\[[^\[]+\])?|\[[^\[]+\]$").unwrap(); // match start/end link;
let re = Regex::new(r"^;?(\[[0-9]:[^\[]+\])?|\[[^\[]+\]$").unwrap(); // match start/end link
let mut video_filter = String::new();
let mut audio_filter = String::new();
@ -35,9 +35,5 @@ pub fn filter_node(filter: &str) -> (String, String) {
error!("Custom filter is not well formatted, use correct out link names (\"[c_v_out]\" and/or \"[c_a_out]\"). Filter skipped!")
}
if filter.starts_with("[v_in]") {
video_filter = format!("[v_in]{video_filter}");
}
(video_filter, audio_filter)
}