fixed epg parsing when newline used in epg file

This commit is contained in:
euzu
2024-10-07 14:12:07 +02:00
parent 5564da959b
commit 528b3b4668
+2 -2
View File
@@ -55,8 +55,8 @@ pub(crate) fn parse_tvguide(content: &str) -> Option<TVGuide> {
}
}
Ok(Event::Text(e)) => {
let text = e.unescape().unwrap().into_owned();
if !text.is_empty() {
let text = e.unescape().unwrap().trim().to_owned();
if !text.is_empty() && !stack.is_empty() {
stack.last_mut().unwrap().value = Some(text);
}
}