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

What laev knows about an anime, as MyAnimeList counts it.

Anime is tracked on its own terms here, not folded into TMDB's. MAL keeps a
*season* as its own entry — "Lupin III: Part II" is one anime, with 155
episodes and a length of its own — and that is the unit laev marks, counts and
times anime in: a mark is `mal-1425-e12`, never a season of a TMDB show that
happens to contain it.

This is the small amount of detail those marks need to mean anything: the
title to show, how many episodes there are, and how long one runs. It comes
from the same list request the import already makes, so a full import leaves
every anime on the list described, and nothing else ever has to ask. An anime
laev plays that the list didn't cover is fetched once and kept.

# `all`

Everything known, as `%{mal_id => fields}` with atom keys.

# `episodes`

How many episodes the anime has, or nil.

Read from the list, so it answers offline — which is what lets the home screen
know a finished anime has no next episode without asking anyone.

# `get`

What's known about one anime, or nil.

# `learn`

Make sure this anime is described, asking MAL once if it isn't.

Called where a pause is already expected — after a play, during an import —
never from a list.

# `put_many`

Remember a map of `mal_id => %{title:, episodes:, seconds:, status:, score:}`.

# `set_status`

Change the status laev has for an anime — "on_hold", "watching", "completed".

Written after laev tells MyAnimeList the same thing, so the page you are
looking at is right immediately instead of at the next import.

# `title`

The anime's title, or nil — never a fetch.

---

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