26 lines
569 B
Python
26 lines
569 B
Python
from dataclasses import dataclass
|
|
from pathlib import Path
|
|
from typing import Iterable, Tuple
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class ScanConfig:
|
|
"""Read-only paths used for one library scan."""
|
|
|
|
serato: Path
|
|
music: Path
|
|
out: Path
|
|
report: Path
|
|
reference_roots: Tuple[Path, ...] = ()
|
|
|
|
@classmethod
|
|
def build(
|
|
cls,
|
|
serato: Path,
|
|
music: Path,
|
|
out: Path,
|
|
report: Path,
|
|
reference_roots: Iterable[Path] = (),
|
|
) -> "ScanConfig":
|
|
return cls(serato, music, out, report, tuple(reference_roots))
|