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>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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."""
|
||||
...
|
||||
Reference in New Issue
Block a user