Skip to content

Audible match found (count=1) but title/author comparison receives empty strings, causing isMatched=False #25

Description

@Mancolt

Description

When booktree finds exactly one Audible candidate via ASIN-seeded search, the subsequent title/author fuzzy-match comparison sometimes receives empty strings for both sides, causing the book to be rejected (isMatched=False) even though a single unambiguous Audible result was found and cached.

Environment

  • Image: myxdvz/booktree:latest (pulled July 2026)
  • Metadata source: audible (via id3-asin seed)

Steps to Reproduce

  1. Source file has embedded ID3 tags including a valid ASIN (B0GL9665Q1), title, and author.
  2. Run booktree against a config using metadata: audible (or mam-audible).
  3. Book is: The Divorce by Freida McFadden.

Observed Behavior (verbose log)

Searching Audible for
asin:B0GL9665Q1
title:The Divorce
authors:"Freida McFadden"
narrators:"January LaVoy"|"Edoardo Ballerini"|"Marin Ireland"
keywords:divorce freida mcfadden january lavoy edoardo ballerini marin ireland
Checking cache: audible/bbd343ce6e339eec9ee3eaad43424e63a4a578cac7a05641f8b352cfc6b1e6fb
Caching bbd343ce6e339eec9ee3eaad43424e63a4a578cac7a05641f8b352cfc6b1e6fb in File: /Config/cache/audible/bbd343ce6e339eec9ee3eaad43424e63a4a578cac7a05641f8b352cfc6b1e6fb
Found 1 Audible match(es)
Finding the best Audible match out of 1 results
Checking if  or  matches my book The Divorce: {'partial': 0, 'token_sort': 0, 'ratio': 0} or {'partial': 0, 'token_sort': 0, 'ratio': 0}
This book doesn't have a matching title or author, checking the next book...
Found 0 MAM matches, 1 Audible Matches

Note both sides of the "Checking if X or Y matches" comparison are blank strings, resulting in a 0 score across all fuzzy-match methods despite exactly one Audible result being found and cached.

Resulting CSV row

book: The Divorce - Freida McFadden.m4b
isMatched: False
isHardLinked: False
audibleMatchCount: 1
metadatasource: id3
id3-asin: B0GL9665Q1
adb-matchRate / adb-asin / adb-title / adb-authors: all blank

Expected Behavior

Given a valid ASIN and a single Audible result, the title/author fields used in the comparison should be populated from the cached Audible response, not blank — resulting in a successful match.

Suspicion

This looks like the Audible API response for this specific title/ASIN may be missing or differently-shaped in a field (title/author) that booktree expects to parse — the cache file was written successfully, but downstream field extraction appears to silently fail and fall back to empty strings rather than raising an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions