Classify static and smart crates
This commit is contained in:
+10
-5
@@ -2,7 +2,7 @@ from pathlib import Path
|
||||
import argparse
|
||||
|
||||
from serato_doctor.config import ScanConfig
|
||||
from serato_doctor.crate_parser import parse_crates
|
||||
from serato_doctor.crate_parser import load_library_crates
|
||||
from serato_doctor.health import analyze_health
|
||||
from serato_doctor.logging import configure_logging
|
||||
from serato_doctor.models.library import Library
|
||||
@@ -55,10 +55,9 @@ def main():
|
||||
logger.debug("Serato directory: %s", config.serato)
|
||||
logger.debug("Music directory: %s", config.music)
|
||||
|
||||
library = Library.build(
|
||||
references=parse_crates(
|
||||
config.serato / "Subcrates", config.reference_roots
|
||||
),
|
||||
crates = load_library_crates(config.serato, config.reference_roots)
|
||||
library = Library.from_crates(
|
||||
crates=crates,
|
||||
tracks=scan_audio(config.music),
|
||||
)
|
||||
results = library.reconcile_by_filename()
|
||||
@@ -75,6 +74,7 @@ def main():
|
||||
print(f"Score Basis: {health.score_basis}")
|
||||
print(f"Tracks: {health.disk_tracks}")
|
||||
print(f"Crate References: {health.total_references}")
|
||||
print(f"References Scored: {health.scored_references}")
|
||||
print(f"Healthy References: {health.healthy_references}")
|
||||
print(f"Broken References: {health.missing_references}")
|
||||
print(f"Unique Missing Filenames: {health.unique_missing_filenames}")
|
||||
@@ -82,6 +82,11 @@ def main():
|
||||
print(f"Duplicate Files: {health.duplicate_files}")
|
||||
print(f"Unused Tracks: {health.unused_tracks}")
|
||||
print(f"Suggested Matches: {health.suggested_matches}")
|
||||
print(f"Static Crates: {health.static_crates}")
|
||||
print(f"Smart Crates: {health.smart_crates}")
|
||||
print(
|
||||
f"Dynamic References Excluded: {health.dynamic_references_excluded}"
|
||||
)
|
||||
else:
|
||||
write_csv(results, config.out)
|
||||
write_missing_report(results, config.report)
|
||||
|
||||
Reference in New Issue
Block a user