Skip to main content

crispy_stream_checker/
lib.rs

1//! Concurrent IPTV stream validation library.
2//!
3//! Validates M3U/IPTV stream URLs by performing HTTP HEAD (with GET fallback)
4//! requests with bounded concurrency. Inspired by
5//! [`iptv-checker-module`](https://github.com/detroitenglish/iptv-checker-module)
6//! and [`IPTVChecker-Python`](https://github.com/kristofferR/IPTVChecker-Python).
7//!
8//! # Example
9//!
10//! ```no_run
11//! # async fn example() {
12//! use crispy_stream_checker::{check_stream, check_bulk, CheckOptions};
13//!
14//! let opts = CheckOptions::default();
15//!
16//! // Single stream
17//! let result = check_stream("http://example.com/stream.m3u8", &opts).await;
18//! println!("available: {}", result.info.available);
19//!
20//! // Bulk check with progress
21//! let urls = vec!["http://a.com/1".into(), "http://b.com/2".into()];
22//! let report = check_bulk(&urls, &opts).await;
23//! println!("{}/{} available", report.available, report.total);
24//! # }
25//! ```
26
27pub mod backoff;
28pub mod checker;
29pub mod checkpoint;
30pub mod csv;
31pub mod dedup;
32pub mod error;
33pub mod normalize;
34pub mod proxy;
35pub mod status;
36pub mod types;
37
38pub use backoff::BackoffStrategy;
39pub use checker::{check_bulk, check_bulk_with_progress, check_stream, check_stream_named};
40pub use checkpoint::CheckpointWriter;
41pub use csv::sanitize_csv_field;
42pub use dedup::UrlDeduplicator;
43pub use error::{CheckerError, summarize_error, summarize_error_str};
44pub use normalize::{normalize_url_for_hash, url_resume_hash};
45pub use proxy::parse_proxy_list;
46pub use status::{categorize_status, meets_data_threshold};
47pub use types::{BulkCheckReport, CheckOptions, CheckResult, StreamCategory, StreamInfo};