Skip to content

epignosis: verify Audnexus enrichment for audiobooks #164

@forkwright

Description

@forkwright

Context

Audiobook m4b files sometimes have sparse iTunes-style metadata (no narrator, no series, no year). Audnexus is the canonical metadata source used by AudioBookshelf and the broader audiobook self-hosting community. `epignosis` is supposed to use Audnexus for audiobook enrichment.

The reference Python migration script at `~/menos-ops/scratch/migrate-audiobooks-canonical.py` deferred Audnexus enrichment with a TODO and falls back to filename parsing — it flags affected books with `needs_metadata = true` in `audiobook.toml`.

What

  1. Verify the Audnexus provider is wired in `epignosis` for audiobook enrichment
  2. Add tests for the lookup paths:
    • Lookup by ASIN (when available)
    • Lookup by title + author (when ASIN missing)
  3. Wire it into the audiobook import path so that when m4b atoms are sparse (missing year, narrator, series), `epignosis::resolve_identity` and `epignosis::enrich` reach out to Audnexus
  4. Cache Audnexus responses per-provider per the existing epignosis caching pattern

Files

  • `crates/epignosis/src/providers/` — verify or add Audnexus provider
  • Cache layer
  • Tests

Acceptance

  • Audnexus provider exists and is registered for audiobook media type
  • Lookup-by-ASIN works
  • Lookup-by-title+author works
  • Cached responses
  • Audiobook import path uses Audnexus when m4b atoms are sparse
  • Test against a real audiobook with known ASIN (e.g. Brandon Sanderson's The Way of Kings, ASIN B003P2WO5E)

Why this matters

Once landed, the `needs_metadata = true` flag in legacy migrated audiobook sidecars can be swept by re-running `harmonia migrate audiobooks` (issue: `harmonia migrate subcommand`) and the Audnexus calls will populate the missing fields automatically.

Reference

  • Audnexus API: https://api.audnex.us/
  • Reference fallback implementation: `~/menos-ops/scratch/migrate-audiobooks-canonical.py` (filename-only fallback with TODO comment for Audnexus)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststorage-canonicalCanonical filesystem storage layout work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions