# `Laev.Kitsu`
[🔗](https://github.com/alexdont/laev/blob/main/lib/laev/kitsu.ex#L1)

Anime-native metadata from Kitsu (kitsu.io JSON:API) — our equivalent of the
Stremio "Anime Kitsu" addon. Used to get proper episode lists (with absolute
numbering) and release titles for anime that TMDB covers poorly or not at all.

# `anidb_id`

The AniDB anime id mapped to a Kitsu anime — lets us query trackers by the exact show.

# `episode_details`

Per-episode metadata for a picked entry: `%{number => %{name, airdate,
future}}`. AniList carries dates (airingSchedule — past AND upcoming) for
airing shows and titles (streamingEpisodes) for finished ones; one call
fetches both. Kitsu-sourced entries use Kitsu's episode list. Best-effort:
empty map on any failure — the picker just shows bare numbers.

# `episodes`

All episodes for a Kitsu anime id, sorted by number. Pages through the API
up to `opts[:max]` episodes (default 500) so long-running shows don't spin
forever. Episodes without a number (specials/recaps) are dropped.

# `kitsu_id_from_mal`

The Kitsu anime id for a MyAnimeList id (reverse mapping) — feeds Torrentio's kitsu: anime path.

# `mal_id`

The MyAnimeList id mapped to a Kitsu anime — the key AniSkip timestamps use.

# `release_title`

# `search`

Search anime by text. Returns `{:ok, [anime]}` best-match first.

AniList is the primary (sub-second, reliable, per-season entries with
romaji titles and airing-aware episode counts); Kitsu — slow at the best
of times and 500ing outright for some queries — is only the fallback.
AniList entries carry no Kitsu id, so the AniDB mapping is unavailable
for them and tracker search uses the release title (works fine).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
