Skip to content

v0.4.0 — Directive API

Choose a tag to compare

@markbyrne markbyrne released this 02 Jul 19:30

Directive API

External tools (e.g. Librarr) can now pre-register the correct match for an incoming file, so Libris imports it with exact, already-verified metadata instead of re-matching from scratch.

  • POST /api/v1/directives — register a match (title, author, ISBN, year, cover, series) keyed on the incoming filename. API-key auth (X-Api-Key), disabled by default (api.enabled + api.api_key in config).
  • GET /api/v1/ping — connectivity/auth check.
  • The watcher applies a matching directive at pickup and skips all metadata lookups (Google Books / Open Library / DuckDuckGo); files without a directive are matched exactly as before.
  • Directives are one-shot (consumed on use) and purged after 48h if the file never arrives.
  • Structured double-dash filenames remain the zero-config fallback path.

Everything downstream — duplicate detection, format conversion, tagging, calibredb import — is unchanged.