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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user