ui polish and importer logging tuning
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user