perf: compress anime requests and reuse AniList search metadata

This commit is contained in:
2026-10-25 20:11:44 +01:00
parent 19267d169b
commit 6cc4e18f72
8 changed files with 141 additions and 15 deletions
+1 -5
View File
@@ -88,11 +88,7 @@ impl Client {
if response.body().mime_type() != Some("application/json") {
return Err(invalid("AniList returned non-JSON content"));
}
let body = response
.body_mut()
.with_config()
.limit(BODY_LIMIT)
.read_to_string()
let body = crate::read_catalog_body(response.body_mut(), BODY_LIMIT)
.map_err(|_| invalid("AniList body unreadable, timed out, or exceeded 2 MiB"))?;
decode(&body)
}