Skip to content

Audible: do not file another book by the same author from a tagged ASIN - #39

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

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

Conversation

@cursor

@cursor cursor Bot commented Oct 10, 2026

Copy link
Copy Markdown

Bug and impact

A file with a usable id3 title and an AUDIBLE_ASIN tag pointing at a different book by the same author was filed under that other title. Typical trigger: leftover tag from another encode in the same author's series (The Girl on the Train tagged as Into the Water, token_sort 77, above matchrate 60). Same hole with a ripper AudioTrack 01 title after the parsed folder name had already rejected the ASIN.

#23's fallback already handled a dead ASIN or a different author. Same-author wrong tags never reached it because the author-only gate accepted the per-ASIN product.

Root cause

Audible's per-ASIN lookup ignores title. _audibleAttempts left requireTitle=False on the legacy attempt, so _rankAudible accepted on author alone. After a parsed title-gated miss, legacy retried the same ASIN against the junk id3 title and the author-only gate won again.

Fix

  • Require a title match when a tagged/parsed ASIN is looked up against a usable id3 or parsed title.
  • If the parsed rung already title-gated that ASIN, do not retry it on the junk id3 title; the existing title/author fallback runs instead.
  • Pinned ASINs, junk-title + trusted ASIN (no parsed title), and a live correct tag (including (Unabridged)) are unchanged.

Validation

  • TaggedAsinFallbackTest: same-author leftover ASIN falls back; (Unabridged) still accepts a live tag; junk id3 title does not let the leftover ASIN beat the parsed folder title.
  • Existing tagged-ASIN, filename-ASIN, and parsed-author cases still pass.
  • Full suite: 265 tests OK.
Open in Web View Automation 

A leftover AUDIBLE_ASIN of another title by the same author passed the
author-only gate (requireTitle was false on the legacy attempt) and beat
matchrate 60. Require a title match for a tagged ASIN when the id3 or
parsed title is usable, and do not retry that ASIN against a junk id3
title after the parsed title already rejected it.

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