From f91117092bbd2c97c30bb86cf9639cc0f0cc4c31 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sat, 11 Jul 2026 00:09:42 +0200 Subject: [PATCH] refactor: use one album path for tagging and library record Co-Authored-By: Claude Opus 4.8 (1M context) --- worker/lyra_worker/pipeline.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/worker/lyra_worker/pipeline.py b/worker/lyra_worker/pipeline.py index ba380e7..e461ccf 100644 --- a/worker/lyra_worker/pipeline.py +++ b/worker/lyra_worker/pipeline.py @@ -175,12 +175,14 @@ def run_pipeline( _fail(conn, job_id, "incomplete download") return + library_path = result.path or dest + if tagger is not None: 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 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) + _import(conn, job_id, target, winner, library_path)