Skip to content

fix(metadata): treat Audible's empty product stub as no answer so the provider chain can continue#762

Draft
kevinheneveld wants to merge 1 commit into
Listenarrs:canaryfrom
kevinheneveld:fix/metadata-empty-audible-stub
Draft

fix(metadata): treat Audible's empty product stub as no answer so the provider chain can continue#762
kevinheneveld wants to merge 1 commit into
Listenarrs:canaryfrom
kevinheneveld:fix/metadata-empty-audible-stub

Conversation

@kevinheneveld

Copy link
Copy Markdown
Contributor

The bug

An ASIN that's missing from Audible's catalog doesn't 404 — the catalog API returns a product node with every attribute null, which GetBookMetadataAsync maps into a non-null but completely empty AudibleBookResponse. AudiobookMetadataService.GetMetadataAsync's provider loop only checks result != null, so the empty shell counted as a win:

  1. the caller receives junk (source: Audible, all fields null) — "fill missing from online" reports success while filling nothing;
  2. every later provider in the chain (Audnexus today, anything added later) is silently skipped, even when it could have answered.

Live case that surfaced it: an Amazon-exclusive audiobook edition whose ASIN returns the empty stub from all ten regional Audible catalog APIs.

The fix

A titleless AudibleBookResponse is treated as no answer (logged) and the loop falls through to the next configured source. One conditional; no behavior change for any ASIN Audible actually carries.

Testing

Full suite: 1189 passed. Verified live on my instance: the previously-junk ASIN now falls through the chain instead of short-circuiting with an empty payload.

🤖 Generated with Claude Code

… provider chain can continue

An ASIN missing from Audible's catalog resolves to a non-null but EMPTY
AudibleBookResponse (no title, no fields — the catalog API returns a
product node with every attribute null). The provider loop took that
shell as a successful answer: the caller received junk metadata
('source: Audible' with nothing in it) and every later source in the
chain (Audnexus, anything added in future) was silently skipped.

Live case: an Amazon-exclusive edition whose ASIN returns the empty
stub from all ten regional Audible catalogs — 'fill missing from
online' reported success while filling nothing. A titleless response
is now treated as no answer and the chain falls through.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant