Files
Audiolib 3871da4bcc Fix matching: add missing subtitle field, proper error logging, match-all endpoint
- MatchResult was missing subtitle field, causing AttributeError in
  _apply_match that silently killed every background match task
- Wrap _apply_match in try/except with exc_info logging so failures
  are visible in docker compose logs backend
- New POST /api/libraries/:id/match-all endpoint to trigger matching
  for all unlocked items (useful for items scanned before the fix)
- Admin UI: Match button per library next to the Scan button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 15:15:11 +02:00

27 lines
709 B
Python

from dataclasses import dataclass, field
from typing import Optional
@dataclass
class MatchResult:
source: str # musicbrainz / open_library / google_books
source_id: str
title: str
subtitle: str | None = None
author: str | None = None
narrator: str | None = None
description: str | None = None
cover_url: str | None = None
publisher: str | None = None
publish_year: int | None = None
series: str | None = None
series_sequence: str | None = None
language: str | None = None
genres: list[str] = field(default_factory=list)
chapters: list[dict] = field(default_factory=list)
confidence: float = 0.0
class BaseMatcherError(Exception):
pass