Documentation
¶
Overview ¶
Package main is seadex-scout: a report-only watcher that compares a Sonarr/Radarr anime library against SeaDex (releases.moe) and emits a structured slog line whenever SeaDex recommends a better release than the one on disk. It never downloads or touches a torrent client; it tells the operator what to go get. Observability is slog-only; there is no HTTP surface.
main.go is the composition root: it installs logging, handles the distroless `health` subcommand, loads and validates the YAML config (CONFIG_PATH, default /config/config.yaml; a starter is written on first boot), builds the scout (build.go), and runs the poll loop. All logic lives in internal/*.
Run modes: the daemon (no argument, or mode: daemon) runs a compare cycle on start and every poll_interval, or sits resident-idle when poll_interval is off/disabled/0 (an external scheduler drives cycles via the `poll` subcommand); the one-shot report (the `report` subcommand or mode: report) writes a SeaDex-alignment report and exits; the `poll` subcommand runs one cycle; and the `health` subcommand backs the Docker healthcheck. Both `poll` and `report` run via `docker exec <container> /seadex-scout <cmd>` while the daemon idles.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
anilist
Package anilist is a minimal AniList GraphQL client used only as a fallback when the Fribb map plus operator overrides miss an AniList ID.
|
Package anilist is a minimal AniList GraphQL client used only as a fallback when the Fribb map plus operator overrides miss an AniList ID. |
|
audit
Package audit produces a full SeaDex-alignment report over the library: for every anime that has a matching SeaDex entry, what release you have and whether it is SeaDex's best, an alt, or unlisted.
|
Package audit produces a full SeaDex-alignment report over the library: for every anime that has a matching SeaDex entry, what release you have and whether it is SeaDex's best, an alt, or unlisted. |
|
compare
Package compare turns matched SeaDex entries into findings.
|
Package compare turns matched SeaDex entries into findings. |
|
config
Package config loads seadex-scout configuration from a single YAML file (default /config/config.yaml).
|
Package config loads seadex-scout configuration from a single YAML file (default /config/config.yaml). |
|
filter
Package filter decides which SeaDex candidate releases an operator could use.
|
Package filter decides which SeaDex candidate releases an operator could use. |
|
library
Package library ingests the Sonarr/Radarr anime library through arrapi into a snapshot: per item its external IDs, tags, current release groups, and a representative release fingerprint.
|
Package library ingests the Sonarr/Radarr anime library through arrapi into a snapshot: per item its external IDs, tags, current release groups, and a representative release fingerprint. |
|
mapping
Package mapping bridges AniList IDs (what SeaDex keys on) to the arr IDs Sonarr and Radarr key on (TVDB, TMDB, IMDb), using the Fribb anime-lists dataset plus a local overrides file the operator can pin misses in.
|
Package mapping bridges AniList IDs (what SeaDex keys on) to the arr IDs Sonarr and Radarr key on (TVDB, TMDB, IMDb), using the Fribb anime-lists dataset plus a local overrides file the operator can pin misses in. |
|
match
Package match links SeaDex entries to library items.
|
Package match links SeaDex entries to library items. |
|
release
Package release classifies a media release from its names, notes, and metadata into a normalized fingerprint: release group, tracker kind, resolution, video codec, dual-audio, and remux-vs-encode.
|
Package release classifies a media release from its names, notes, and metadata into a normalized fingerprint: release group, tracker kind, resolution, video codec, dual-audio, and remux-vs-encode. |
|
report
Package report emits findings as structured slog events with cross-cycle dedupe.
|
Package report emits findings as structured slog events with cross-cycle dedupe. |
|
scout
Package scout orchestrates one compare cycle: load state, walk the library, refresh the ID map, pull SeaDex, match entries to library items, compare, and report findings, then persist the caches.
|
Package scout orchestrates one compare cycle: load state, walk the library, refresh the ID map, pull SeaDex, match entries to library items, compare, and report findings, then persist the caches. |
|
seadex
Package seadex is a read client for the SeaDex (releases.moe) PocketBase API.
|
Package seadex is a read client for the SeaDex (releases.moe) PocketBase API. |
|
state
Package state persists seadex-scout's cross-cycle cache as a single JSON file written atomically: the last library snapshot (for diffing), the cached Fribb map plus its HTTP validators, the AniList fallback memo, and the finding dedupe records.
|
Package state persists seadex-scout's cross-cycle cache as a single JSON file written atomically: the last library snapshot (for diffing), the cached Fribb map plus its HTTP validators, the AniList fallback memo, and the finding dedupe records. |