Skip to content

mam/audible: null author_info or authors no longer abort the run - #28

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-0003
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-0003

Conversation

@cursor

@cursor cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown

A snatched MAM hit with author_info null (radio / uncredited) or already a JSON object used to TypeError in getMAMBook and skip every later book. narrator_info and series_info were guarded for null in #24; author_info was not.

The same run-killing TypeError/KeyError happened in product2Book when Audible sent authors, narrators, or category_ladders as null, or an author/narrator without name.

Fix: parse MAM *_info fields through _mamJsonObject (string, already-decoded object, or skip). Skip incomplete Audible contributor/ladder entries the same way series.sequence already is.

Validation: python3 -m unittest discover -s tests -p 'test_*.py' — 223 tests, 0 failures. New cases cover null/decoded/bad author_info and null authors/ladders through ranking.

Open in Web View Automation 

getMAMBook still did len() and json.loads on author_info, so a snatched
hit with author_info null (radio / uncredited) or an already-decoded
object TypeError'd and skipped every later book. product2Book had the
same gap for authors/narrators/category_ladders after series.sequence
was hardened. Skip those fields the same way.

Co-authored-by: Mancolt <Mancolt@users.noreply.github.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