ui polish and importer logging tuning

This commit is contained in:
Bryan Van Deusen
2026-01-28 09:36:59 -05:00
parent 0bf1961175
commit d0fcde38e8
12 changed files with 110 additions and 133 deletions
+11
View File
@@ -212,6 +212,11 @@ def import_media_file(self, task_id: int):
# Add artist tag
_add_artist_tag(record, artist)
# Add archive tag if this file came from an archive
archive_tag_id = context.get('archive_tag_id')
if archive_tag_id:
_add_archive_tag(record, archive_tag_id)
db.session.add(record)
db.session.commit()
@@ -515,6 +520,12 @@ def _supersede_existing(task: ImportTask, old_record: ImageRecord, src_path: str
old_record, dest_path, thumb_path, file_hash, phash, metadata, filename
)
# Add archive tag if this file came from an archive
context = task.context or {}
archive_tag_id = context.get('archive_tag_id')
if archive_tag_id:
_add_archive_tag(record, archive_tag_id)
db.session.commit()
# Complete task