feat: add AniList browsing with on-demand ZokoAnime playback

This commit is contained in:
2026-10-25 15:44:41 +01:00
parent a281c6730a
commit e328ff3883
20 changed files with 1062 additions and 235 deletions
+37
View File
@@ -0,0 +1,37 @@
//! Read-only native smoke: cargo run --locked --example anilist_probe
use std::io;
use tubular::{
anilist::{Client, catalog_count},
anime::Identity,
};
fn main() -> io::Result<()> {
let client = Client::default();
let results = client.search("Cowboy Bebop")?;
let media = results
.iter()
.find(|media| media["id"] == "1")
.ok_or_else(|| io::Error::other("Exact Cowboy Bebop AniList ID 1 absent from search"))?;
let id = media["id"]
.as_str()
.ok_or_else(|| io::Error::other("Missing catalog ID"))?;
let detail = client.detail(id)?;
let count = catalog_count(&detail)?.ok_or_else(|| io::Error::other("Catalog count unknown"))?;
if count == 0 {
return Err(io::Error::other("No catalog episode number 1"));
}
let identity = Identity::anilist(id.into(), 1)?;
println!(
"native search: {} records; exact AniList ID {id}",
results.len()
);
println!(
"detail: {count} catalog episode numbers; selected episode 1; provider availability UNVERIFIED"
);
println!("identity: {}", identity.key());
println!("watch URL: {}", identity.watch_url()?);
println!(
"PASS: native AniList search -> exact detail -> UNVERIFIED catalog episode -> stable sub URL (no playback request)"
);
Ok(())
}