mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-30 02:32:24 +01:00
bundled event handling in event manager
This commit is contained in:
@@ -307,4 +307,18 @@ mod test {
|
||||
assert_eq!(pli.chno, "7");
|
||||
assert_eq!(pli.group, "Sydney");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_process_header_xui_id() {
|
||||
let input: &str = "hello";
|
||||
let video_suffixes = Vec::new();
|
||||
let url = "http://hello.de/hello.ts";
|
||||
let line = r#"#EXTINF:-1 tvg-id="abc-seven" xui-id="provider-123" group-title="Sydney", Seven"#;
|
||||
|
||||
let pli = process_header(input, &video_suffixes, line, url);
|
||||
assert_eq!(pli.title, "Seven");
|
||||
assert_eq!(pli.id, "provider-123"); // Should use xui-id
|
||||
assert_eq!(pli.epg_channel_id, Some("abc-seven".to_string())); // Should preserve original tvg-id
|
||||
assert_eq!(pli.group, "Sydney");
|
||||
}
|
||||
}
|
||||
@@ -286,7 +286,7 @@ async fn process_source(client: Arc<reqwest::Client>, cfg: Arc<AppConfig>, sourc
|
||||
if source_downloaded {
|
||||
if source_playlists.is_empty() {
|
||||
debug!("Source at index {source_idx} is empty");
|
||||
errors.push(notify_err!(format!("Source at {source_idx} is empty")));
|
||||
errors.push(notify_err!(format!("Source at index {source_idx} is empty: {}", source.inputs.iter().map(|i| i.name.as_str()).collect::<Vec<_>>().join(", "))));
|
||||
} else {
|
||||
debug_if_enabled!("Source has {} groups", source_playlists.iter().map(|fpl| fpl.playlistgroups.len()).sum::<usize>());
|
||||
for target in &source.targets {
|
||||
|
||||
Reference in New Issue
Block a user