4907d0d5a4
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>
17 lines
334 B
Python
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."""
|
|
...
|