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