refactor: use one album path for tagging and library record

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-11 00:09:42 +02:00
parent 1596bab23e
commit f91117092b
+4 -2
View File
@@ -175,12 +175,14 @@ def run_pipeline(
_fail(conn, job_id, "incomplete download") _fail(conn, job_id, "incomplete download")
return return
library_path = result.path or dest
if tagger is not None: if tagger is not None:
try: try:
tagger.tag_album(dest, target) tagger.tag_album(library_path, target)
except Exception as e: # a tagging failure must not discard a good download 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) print(f"pipeline: tagging failed for job {job_id}: {e}", flush=True)
# 6. import # 6. import
_set_state(conn, job_id, "imported", "import") _set_state(conn, job_id, "imported", "import")
_import(conn, job_id, target, winner, result.path or dest) _import(conn, job_id, target, winner, library_path)