Laev.Quality (laev v0.1.40)

Copy Markdown View Source

What is actually out there for a title, before you commit to hunting through it.

A film in cinemas has forty sources and every one of them is a phone camera pointed at a screen; the same film two months later has WEB-DLs. The list looks identical from the outside, so the only way to tell used to be to pick the title, wait through a probe, and read the release names.

This asks the indexers once per title and keeps the tally: how many sources, the best resolution among the ones that aren't cam rips, and how much of it is cam. Enough to answer "worth my time?" and "is it out in HD yet?" without resolving anything on the debrid provider — that is the slow part, and none of it is needed to count what exists.

Nothing is asked for a title you don't look at. The picker reports which row the cursor is on and only that one is fetched, cached on disk for six hours — long enough to be instant while browsing, short enough that a film's first WEB-DL shows up the same day.

Summary

Functions

A short label for a list row: what the best thing available is, or that it is all cam. nil when there is nothing worth saying.

The cached tally for a title, or nil when nothing fresh is on disk. Never touches the network — safe to call while rendering a list.

Ask the indexers what exists for a title and remember the answer.

The full line for the preview pane, beside the poster.

Drop tallies nobody will read again. They go stale after six hours, so anything much older than that is only taking up a directory entry.

Functions

badge(arg1)

A short label for a list row: what the best thing available is, or that it is all cam. nil when there is nothing worth saying.

cached(type, tmdb_id)

The cached tally for a title, or nil when nothing fresh is on disk. Never touches the network — safe to call while rendering a list.

fetch(type, tmdb_id, titles, year)

Ask the indexers what exists for a title and remember the answer.

titles is the accept list from Laev.Sources.release_ok?/4 — the tally is only worth anything if the sources counted are actually this title's, which for the 2026 "Runner" films is the difference between "cam only" and "4K".

line(arg1)

The full line for the preview pane, beside the poster.

prune()

Drop tallies nobody will read again. They go stale after six hours, so anything much older than that is only taking up a directory entry.