Skip to content

feat: Use sl_source field to improve BookDB trust weighting #254

Description

@deucebucket

Problem

When BookDB returns audio identification results, it includes an sl_source field indicating the quality of the match:

  • database — matched against 50M+ book database (highest confidence)
  • audio — Whisper transcript only, no database match (medium)
  • live_scrape — last-resort web scraping (lowest)

LM currently captures this field but never uses it. All three sources get treated identically in the BookProfile, missing an opportunity to improve confidence scoring.

Fix

In library_manager/providers/bookdb.py and library_manager/pipeline/layer_audio_id.py:

  • Map sl_source to differentiated source names: bookdb_audio (database), bookdb_transcript (audio), bookdb_scrape (live_scrape)
  • Use appropriate weights: database=75, transcript=60, scrape=45
  • Store the differentiated source in BookProfile so confidence calculations reflect actual match quality

Files

  • library_manager/providers/bookdb.py — map sl_source to differentiated source names
  • library_manager/pipeline/layer_audio_id.py — pass differentiated source to BookProfile
  • library_manager/models/book_profile.py — add new source weights if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestintegrationCross-system integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions