Files
Jonathan 4907d0d5a4 feat: library scan — probe seam + scan_library (have + monitored + followed)
Adds the AudioProbe seam (probe.py, _probe.py MutagenProbe with a lazy
mutagen import, FakeAudioProbe) and scan_library, which walks /music,
resolves each album against MusicBrainz (falling back to embedded tags
when the folder name doesn't resolve), and idempotently records matched
albums as have (LibraryItem), monitored (MonitoredRelease, fulfilled),
and followed (WatchedArtist, autoMonitorFuture=false).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 17:00:33 +02:00

17 lines
334 B
Python

from dataclasses import dataclass
from typing import Protocol
@dataclass(frozen=True)
class ProbeResult:
artist: str
album: str
fmt: str
quality_class: int
class AudioProbe(Protocol):
def probe(self, path: str) -> ProbeResult:
"""Read an audio file's artist/album tags + format/quality."""
...