iamnbutler/shelfgoblinPublic

Shelf Goblin — discover LitRPG audiobooks, follow series, and track your library.

Add Audible category-based discovery (#26)

Add category browsing to the Audible fetcher, supplementing existing
keyword searches with category_id-based API queries. Category browsing
runs before keyword searches to catch books that are correctly
categorized but may not contain genre keywords in their metadata.

- Populate audible-searches.json with Fantasy and Science Fiction
  category IDs (18580606011, 18580607011)
- Add per-entry validation for category config (id, name, maxPages)
- Add fetchCategoryPage() method using category_id parameter
- Category searches tracked in fetch_runs with `category:Name` keys
- Uses search cursors for incremental fetching, same as keyword searches
- Deduplication handled by existing upsertBook() (ASIN-based)
IAiamnbutler authored
670c907Patch
Parent8be15bb
3 files changed+96-1
StackedSplit
scripts/backend/config.ts+8 −0
scripts/backend/config/audible-searches.json+4 −1
scripts/backend/fetchers/audible.ts+84 −0