Laev.Watchlist (laev v0.1.40)

Copy Markdown View Source

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.

Entries are plain string-keyed maps:

%{"type", "tmdb_id", "title", "year", "poster", "added_at"}

Summary

Functions

Pin a title (from a TMDB title map: type/id/title/year/poster).

All watchlist entries, most recently added first.

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

Drop the cache and re-read watchlist.json — for when something other than this module rewrote the file (a sync pull).

Pin if unpinned, unpin if pinned. Returns :added | :removed.

Functions

add(title)

Pin a title (from a TMDB title map: type/id/title/year/poster).

all()

All watchlist entries, most recently added first.

count()

has?(type, tmdb_id)

init()

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

key(type, tmdb_id)

reload()

Drop the cache and re-read watchlist.json — for when something other than this module rewrote the file (a sync pull).

remove(type, tmdb_id)

toggle(title)

Pin if unpinned, unpin if pinned. Returns :added | :removed.