# laev v0.1.40 - API Reference

## Modules

- [Laev.Account](Laev.Account.md): Is the debrid subscription still good?
- [Laev.Blocklist](Laev.Blocklist.md): Set of torrent hashes known to be unresolvable — mostly Real-Debrid DMCA
takedowns (HTTP 451 `infringing_file`), which are global and permanent, so
there's no point retrying them.
- [Laev.CLI](Laev.CLI.md): The `laev` command-line interface.
- [Laev.Calendar](Laev.Calendar.md): Release calendar for the watchlist: when episodes of pinned shows/anime
air, and when pinned movies hit theaters / digital (digital = the moment
proper WEB releases replace cams).
- [Laev.Cards](Laev.Cards.md): The dozen TMDB fields a list row is made of, kept on disk.
- [Laev.Days](Laev.Days.md): How much was watched on each day.
- [Laev.Dictionary](Laev.Dictionary.md): Word lookups for the built-in hover dictionary. Japanese comes from Jisho
(JMdict-backed, same data Yomitan users rely on); results are cached in ETS
so repeated hovers are instant and we're gentle on Jisho.
- [Laev.Doctor](Laev.Doctor.md): Health checks for `laev doctor` and live key validation for `laev setup`.
- [Laev.FilePick](Laev.FilePick.md): Choosing the right video file inside a torrent — shared by every debrid
provider. Files come in as maps with `"path"` and `"bytes"` (plus whatever
provider-specific keys the caller wants back, e.g. `"id"`).

- [Laev.Jimaku](Laev.Jimaku.md): Jimaku (jimaku.cc) client — a database of Japanese anime subtitles, indexed
per anime and per episode. Searching/listing needs the API key; the actual
subtitle files download from public URLs (no key).

- [Laev.Log](Laev.Log.md): Keep the logger off the screen, and keep it from taking the app down with it.
- [Laev.NowPlaying](Laev.NowPlaying.md): Whether mpv is still playing something laev started, and what.
- [Laev.OpenSubtitles](Laev.OpenSubtitles.md): OpenSubtitles.com REST API client — search subtitles in any language and
fetch the actual .srt text.
- [Laev.Quality](Laev.Quality.md): What is actually out there for a title, before you commit to hunting through it.
- [Laev.Quiet](Laev.Quiet.md): Nothing else writes to the terminal while a picker owns it.
- [Laev.RD](Laev.RD.md): Real-Debrid REST API client.
- [Laev.Ratings](Laev.Ratings.md): Your TMDB ratings, read back as "I have watched this".
- [Laev.Remux.Worker](Laev.Remux.Worker.md): Runs one ffmpeg process that remuxes a source URL into an HLS playlist +
segments on disk. Owns the OS process and temp dir; killing the worker kills
ffmpeg and cleans up.

- [Laev.Season](Laev.Season.md): The four anime seasons, which are what people actually mean by "this season".
- [Laev.Seasons](Laev.Seasons.md): How many episodes of a season have actually aired.
- [Laev.SessionCache](Laev.SessionCache.md): What laev remembers for the length of one run, and for how long.
- [Laev.Skip](Laev.Skip.md): Intro/credits skipping with a Netflix-style on-screen prompt.
- [Laev.SubtitleCache](Laev.SubtitleCache.md): In-memory cache of converted subtitle VTT, keyed by source. Prevents
re-downloading the same subtitle on every page reload — important for
OpenSubtitles, whose downloads count against a small daily quota.

- [Laev.SubtitleFetch](Laev.SubtitleFetch.md): Fetch an external subtitle file for a title/episode and save it locally so
a desktop player can load it (`mpv --sub-file=<path>`).
- [Laev.Subtitles](Laev.Subtitles.md): Convert subtitle files to WebVTT, which is the only format an HTML5
`<video>` `<track>` accepts. Handles SubRip (.srt) and Advanced SubStation
Alpha (.ass, common for anime), dispatching on the file name.

- [Laev.Titles](Laev.Titles.md): What things are called, for the screens that only have an id.
- [Laev.Torbox](Laev.Torbox.md): TorBox API client — the second debrid provider.
- [Laev.Tracks](Laev.Tracks.md): Audio / subtitle languages of a resolved stream.
- [Laev.UpdateCheck](Laev.UpdateCheck.md): Checks GitHub's latest release tag against the running version — used by
the interactive menu only (never by plumbing commands, which must stay
network-predictable). The result is cached for a few hours so launches
don't hit GitHub every time, and every failure path degrades to :unknown.

- [Laev.VLC](Laev.VLC.md): Playing through VLC instead of mpv, and knowing where you got to.

- What you are watching
  - [Laev.Holds](Laev.Holds.md): Shows you have put down, without saying you are done with them.
  - [Laev.Position](Laev.Position.md): Exact playback-position memory, crash-safe.
  - [Laev.Resume](Laev.Resume.md): 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.
  - [Laev.Shelf](Laev.Shelf.md): What you are in the middle of, as data.
  - [Laev.Stats](Laev.Stats.md): What you've watched, totalled.
  - [Laev.Watchlist](Laev.Watchlist.md): The user's curated to-watch list — intent, as opposed to `Resume`'s
automatic history. Titles are pinned/unpinned with ctrl-s from any title
picker and browsed from the main menu. ETS mirrored to JSON, same pattern
as `Resume`.

- Finding and playing
  - [Laev.Playback](Laev.Playback.md): Where a stream is played, and how its progress gets back.
  - [Laev.Player](Laev.Player.md): Launches an external desktop player for a stream URL.
  - [Laev.Providers](Laev.Providers.md): Multi-debrid orchestration: one resolve/probe interface over every
configured provider (Real-Debrid first — deepest cache — then TorBox).
  - [Laev.Remux](Laev.Remux.md): Local, on-the-fly HLS remuxer. Given a (range-seekable) source URL, ffmpeg
stream-copies it into HLS segments on local disk — near-instant and lossless
for h264/aac, hardware-encoding only when the codec isn't browser-playable.
  - [Laev.Sources](Laev.Sources.md): Torrent source discovery. Two backends feed a common source struct

- Metadata
  - [Laev.Anime](Laev.Anime.md): What laev knows about an anime, as MyAnimeList counts it.
  - [Laev.AnimeMap](Laev.AnimeMap.md): Which MyAnimeList entry is which TMDB title.
  - [Laev.Franchises](Laev.Franchises.md): Hand-curated franchises, for the ones TMDB groups badly.
  - [Laev.Kitsu](Laev.Kitsu.md): 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.

  - [Laev.MAL](Laev.MAL.md): MyAnimeList API v2 client — anime list scrobbling.
  - [Laev.Tmdb](Laev.Tmdb.md): Minimal TMDB v3 API client — search, movie/TV details, season episodes.

- Per user
  - [Laev.Config](Laev.Config.md): Loads provider tokens and API keys into the app env.
  - [Laev.Scope](Laev.Scope.md): Whose laev this is.
  - [Laev.Settings](Laev.Settings.md): Reading and changing what laev is configured with, from anywhere.
  - [Laev.Sync](Laev.Sync.md): Optional cross-device sync of user state to a self-hosted endpoint.

