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

Per-title "continue watching" memory: the last season/episode + the exact
source (torrent) the user played for each movie/show, so they can resume
without re-hunting the source list. Held in ETS and mirrored to a JSON file so
it survives server restarts. Time-within-the-episode is remembered separately,
client-side (localStorage keyed by the remux id), and resumes automatically.

Entries are plain string-keyed maps (JSON round-trips cleanly):

    %{"type", "tmdb_id", "season", "episode", "title", "poster_path",
      "source" => %{"name", "magnet", "hash"}, "updated_at"}

# `all`

All resume entries, most recently updated first.

# `delete`

Forget a title's place entirely. The next sync turns the gap into a
tombstone, so the removal travels to your other devices rather than being
undone by the first pull.

# `get`

The resume entry for a title, or nil.

# `init`

Make sure this scope's table exists. Asking for it is enough.

# `key`

# `put`

Record (or update) where the user is in a title.

# `reload`

Drop the cache and re-read resume.json — for when something other than
`put/3` rewrote the file (a sync pull). Without this the stale table would
not only show old history but clobber the synced file on the next persist.

---

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