feat(deep-scan): Importer(deep=) re-derive on sha-match; import_file wires batch.scan_mode

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-19 15:32:26 -04:00
parent 9535533385
commit 5dfdbf5a60
3 changed files with 139 additions and 4 deletions
+3
View File
@@ -55,12 +55,15 @@ def import_media_file(self, import_task_id: int) -> dict:
select(ImportSettings).where(ImportSettings.id == 1)
).scalar_one()
import_root = Path(settings.import_scan_path)
batch = session.get(ImportBatch, task.batch_id)
deep = bool(batch and batch.scan_mode == "deep")
importer = Importer(
session=session,
images_root=IMAGES_ROOT,
import_root=import_root,
thumbnailer=Thumbnailer(images_root=IMAGES_ROOT),
settings=settings,
deep=deep,
)
try: