feat: Tagger seam and pipeline tag-stage integration

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-10 23:47:20 +02:00
parent 2812695465
commit 1c02a870f3
4 changed files with 69 additions and 0 deletions
+7
View File
@@ -103,6 +103,7 @@ def run_pipeline(
job_id: str,
adapters: Sequence[SourceAdapter],
resolver=None,
tagger=None,
min_confidence: float = 0.7,
dest_root: str = "/music",
) -> None:
@@ -174,6 +175,12 @@ def run_pipeline(
_fail(conn, job_id, "incomplete download")
return
if tagger is not None:
try:
tagger.tag_album(dest, target)
except Exception as e: # a tagging failure must not discard a good download
print(f"pipeline: tagging failed for job {job_id}: {e}", flush=True)
# 6. import
_set_state(conn, job_id, "imported", "import")
_import(conn, job_id, target, winner, result.path or dest)