Parent
- #402 Acquire word-timed lyrics from AMLL, then fall back to LRCLIB
What to build
On a lyrics cache miss, Lyrics Acquisition tries AMLL first among online sources. A confident AMLL match that parses to Word-timed Lyrics wins and is cached as amll. Otherwise OpenKara falls through to LRCLIB, then LrcApi. Local cache, embedded, and sidecars still beat every online source. Playback does not wait on AMLL when lyrics already exist on disk. Line-timed AMLL TTML is a miss. No LrcLib-compatible AMLL endpoints. No q or duration query params. No AGPL player packages.
Acceptance criteria
- Online order is AMLL, then LRCLIB, then LrcApi. Local-before-online is unchanged.
- Native search then get-by-id only. Search uses title and artist, plus album when present; empty album page retries once without album.
- Confident match: NFKC + lowercase + feat/version-noise strip; title similar AND artist overlap; win iff one filtered hit or exactly one exact title+artist among similars.
- AMLL wins only when parsed TTML has at least one line with word tokens. Accept-gate must not run the LRC timed-line check on AMLL TTML.
- 404 / empty / ambiguous / line-timed = AMLL miss (fall through). 429 / 5xx / timeout = unavailable (no negative cache).
- After persist, the command payload is rebuilt from the cache row so offset matches disk. Source change uses 0 or a best-effort TTML-declared offset.
- ADR 0026 records the new online order and supersedes ADR 0015 for chain order only. Lyrics contract items for fetch order update in the same change.
- Mocked HTTP tests cover: no
q/duration; word-timed get isamlland LRCLIB is not called after get; AMLL miss then LRCLIB hit; AMLL unavailable then LRCLIB hit.
Blocked by
- Ticket 1 (expand
roman/amlltypes)