Modules
Is the debrid subscription still good?
What laev knows about an anime, as MyAnimeList counts it.
Which MyAnimeList entry is which TMDB title.
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.
The laev command-line interface.
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).
The dozen TMDB fields a list row is made of, kept on disk.
Loads provider tokens and API keys into the app env.
How much was watched on each day.
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.
Health checks for laev doctor and live key validation for laev setup.
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").
Hand-curated franchises, for the ones TMDB groups badly.
Shows you have put down, without saying you are done with them.
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).
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.
Keep the logger off the screen, and keep it from taking the app down with it.
MyAnimeList API v2 client — anime list scrobbling.
Whether mpv is still playing something laev started, and what.
OpenSubtitles.com REST API client — search subtitles in any language and fetch the actual .srt text.
Where a stream is played, and how its progress gets back.
Launches an external desktop player for a stream URL.
Exact playback-position memory, crash-safe.
Multi-debrid orchestration: one resolve/probe interface over every configured provider (Real-Debrid first — deepest cache — then TorBox).
What is actually out there for a title, before you commit to hunting through it.
Nothing else writes to the terminal while a picker owns it.
Real-Debrid REST API client.
Your TMDB ratings, read back as "I have watched this".
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.
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.
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.
Whose laev this is.
The four anime seasons, which are what people actually mean by "this season".
How many episodes of a season have actually aired.
What laev remembers for the length of one run, and for how long.
Reading and changing what laev is configured with, from anywhere.
What you are in the middle of, as data.
Intro/credits skipping with a Netflix-style on-screen prompt.
Torrent source discovery. Two backends feed a common source struct
What you've watched, totalled.
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.
Fetch an external subtitle file for a title/episode and save it locally so
a desktop player can load it (mpv --sub-file=<path>).
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.
Optional cross-device sync of user state to a self-hosted endpoint.
What things are called, for the screens that only have an id.
Minimal TMDB v3 API client — search, movie/TV details, season episodes.
TorBox API client — the second debrid provider.
Audio / subtitle languages of a resolved stream.
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.
Playing through VLC instead of mpv, and knowing where you got to.
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.