Skip to content

Make auto-download quality score threshold configurable (currently hardcoded at 50/100) #223

Closed

Description

@pradeda

Description:

The search-indexers processor filters results using a hardcoded quality threshold of score >= 50 && finalScore >= 50 before triggering an automatic download. If all results fall below this threshold, the request is set back to awaiting_search and retried indefinitely.

The scoring system breaks down as follows (max 100 pts):

  • matchScore: 60 pts (title/author match)
  • sizeScore: 15 pts (MB/min ratio — returns 0 if duration data is unavailable)
  • formatScore: 10 pts
  • seederScore: ~15 pts

In practice, the threshold of 50 is too strict for less popular or niche audiobooks because:

  1. Auto-search mode uses requireAuthor: true, which is stricter than interactive search
  2. If Audnexus doesn't return durationMinutes for a book, sizeScore is 0 automatically, making it significantly harder to reach 50
  3. Torrents with non-standard naming conventions (e.g. Author - Title (Narrator) [format]) can produce low matchScore even when the content is correct

The result is that requests for valid, available audiobooks loop indefinitely between searching and awaiting_search while interactive/manual search finds results immediately.

Expected behavior: The threshold should be a configurable admin setting (e.g. in Settings → Indexers), defaulting to 50 but adjustable. A value of 30–35 works well for broader indexer coverage without sacrificing quality.

Workaround: Patch score >= 50 → score >= 30 directly in the compiled Next.js bundle (src_lib_*._.js in .next/standalone/.next/server/chunks/).

Environment: v1.2.1

Activity

  1. tottencam commented on Aug 16, 2026

    @tottencam

    Seconding the request for a configurable threshold, with one correction to the proposed mechanism
    based on data from my instance (v1.2.2, region au).

    The issue lists missing durationMinutes zeroing sizeScore as a main driver. On my instance that
    isn't what's happening — over a 3-hour window with ~140 automatic searches, the logs show 119
    Fetched runtime successes and zero No runtime found
    . Runtime lookup is working, sizeScore
    is being awarded, and requests are still failing the 50 gate.

    Looking at what actually comes back for the failures, the driver is matchScore (60 of the 100
    points), and it splits into two distinct cases that I think want different treatment:

    1. Correct book present, rejected on an author/title technicality. These are real false
    negatives and a lower threshold would fix them:

    • Tom Clancy's Op-Center Fix request button disable logic for status states #12: War of Eagles — the book is on my indexer as
      War of Eagles by Jeff Rovin [ENG / M4B]. Jeff Rovin is the actual writer of the Op-Center
      series; Audible credits it to Tom Clancy. With requireAuthor: true the author score is 0/15
      and the title differs by the whole Tom Clancy's Op-Center #12: prefix.
    • Deep Down (A Jack Reacher short story) — present as
      Deep Down: A Reacher Story by Lee Child [ENG / MP3]. Author matches; the title variant alone
      drags it under.

    2. Correct book genuinely absent, and the near-misses are plausible enough to be dangerous.
    A lower threshold would grab the wrong book here, not a lower-quality copy of the right one:

    • It (Stephen King) — not on my indexer at all. The top scorers are
      You Like It Darker by Stephen King and It Grows on You by Stephen King. Both match the
      author perfectly (15/15) and are legitimate M4B releases with good seeders, so they gain
      everything except title similarity.
    • Getaway (Lee Child) — not present; the near-misses are MatchUp anthologies that Lee Child
      contributed to, again with a perfect author match.

    Short and generic titles are where this bites: It, Getaway, White, Pin, 2 B R 0 2 B are
    all in my backlog, and for those the title term carries almost no discriminating signal while the
    author term carries full marks. Dropping the global threshold to 30–35 would auto-download the
    wrong book for every one of them, and an auto-import of the wrong book is a lot more annoying to
    undo than a request that stays pending.

    So: configurable is right, but a single global number may not be enough. Some options that would
    help more, roughly in order of how much I'd want them:

    • Scale the required title similarity by title length. A 2–3 character title should demand a
      near-exact match; a long distinctive title can afford fuzziness. This alone separates case 1 from
      case 2.
    • Require a minimum matchScore component, not just the total. A result should never qualify
      on author + format + size + seeders while scoring ~0 on title.
    • Make the threshold configurable per the original request, defaulting to 50 — with the
      caveat above documented, so people lowering it know the failure mode is wrong-book rather than
      low-quality.

    Happy to pull more numbers from my instance if the score breakdowns for specific rejections would
    be useful — I can log formatScore/sizeScore/seederScore/matchScore per candidate.

  2. kikootwo commented on Oct 19, 2026

    @kikootwo
    Owner

    Dug into this one. The fixed 50 isn't really the problem. Correct books are scoring low because of how titles and authors get matched: a subtitle right after a colon ("Deep Down: A Reacher Story") throws off the title match, and authors with initials (JD Robb vs J D Robb) fail the author check.

    So I'm fixing the matching instead of adding a threshold setting. A lower bar would start auto-grabbing the wrong book for short titles, and a wrong book auto-imported is a lot worse than a request that stays pending. Thanks @tottencam for the data from your instance, that made this an easy call.

    Leaving this open while the matching fixes land.

  3. Eyji commented on Oct 19, 2026

    @Eyji
    Contributor

    A few real cases that the colon and initials fixes won't cover, in case they help for tests. They come from a French library: 97 requests replayed with stricter rules, where 75 had a valid release and 26 of those score under 50. The scores below are from current main (77cdb73) in auto mode (requireAuthor: true), with each release's real size, duration and seeders.

    Right book, rejected:

    Request title Release name Score matchScore Cause
    L'intruse L.Intruse.Freida.McFadden.2026.FR.[Mp3.128.Kbps]-NOTAG 29 0 apostrophe
    Changer l'eau des fleurs Changer.L.Eau.Des.Fleurs.Valerie.Perrin.2022.FR.[M4B.128.kbps]-AG404 32 0 apostrophe
    L'Héritage Cycle.de.l.Heritage.T04.L.Heritage.Christopher.Paolini.2020.FR.[MP3.64kbps]-LiesKey 17 0 apostrophe
    Primal Hunter 1. Une aventure de LitRPG Primal.Hunter.T01.Zogarth.2024.FR.[MP3.128.KBPS]-NOTAG 29 0 subtitle after ". ", 1 vs T01
    C'était ça ou mourir - Prix du Roman FNAC 2026 C.Etait.Ca.Ou.Mourir.Thelyson.Orelien.2026.FR.[MP3.64.kbps]-KIKI 23 0 subtitle after " - "

    normalizeForMatching() keeps the apostrophe, so the title word is l'intruse while the release only has l intruse, and the word-coverage gate fails. English titles hit it too: Ender's Game against Enders.Game.Orson.Scott.Card.MP3 scores 24 with a matchScore of 0. For the other two rows, I checked each cause on its own: Primal Hunter 1 scores 84 against Primal.Hunter.1 but 24 against Primal.Hunter.01, and a subtitle after ". " or " - " fails where the same subtitle after ":" passes.

    Wrong book, accepted:

    Request title Release name Score
    Le problème à trois corps (book 1) Le.Probleme.a.Trois.Corps.T2.La.Foret.Sombre.Liu.Cixin.VFF.[M4B.128kbs]-NOTAG 70
    Dungeon Crawler Carl (book 1) Matt Dinniman - Dungeon Crawler Carl, T03 Le Livre de recettes de l'Anarchiste - 2025 [M4B 16 bits 44.1 kHz] - SGFx 78

    Both are a later volume of the series and clear 50 easily. Checking a volume marker in the release name (T2, Book 2, Tome 2) against the series position would stop these, which also covers @tottencam's wrong-book concern.

  4. added a commit that references this issue on Oct 27, 2026
    f5b0543
  5. added
    dev-completedev work is completed, being tested or awaiting release
    on Oct 27, 2026
  6. kikootwo commented on Oct 27, 2026

    @kikootwo
    Owner

    @pradeda fixed in #459, though not with a setting. The wrong grabs came from how titles and authors were matched, not from the 50 cutoff, so automatic search now needs the numbers in the title, matches author names as whole words, turns down a different volume of the same series, and is stricter with one-word titles. Subtitles after a colon and author initials match better too. @Eyji thanks for the French library cases, they went straight into the tests. The apostrophe ones are being worked in #469, and the . / - subtitle cases are tracked in #466. It'll be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ReleasedbugSomething isn't workingdev-completedev work is completed, being tested or awaiting release

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions