Add comment about renaming of legacy files

This commit is contained in:
Pierre-Yves Nicolas
2026-01-13 09:47:21 +01:00
parent 84df865a5d
commit 8c65eb58f3

View File

@@ -285,6 +285,10 @@ class ImageRepository(
val rotated: List<File> val rotated: List<File>
) )
// Legacy normalization strategy:
// If only rotated files exist, keep ONE arbitrarily as base (id.jpg)
// and discard the others. We intentionally sacrifice exact rotation
// fidelity to restore a coherent model.
private fun normalizeLegacyFiles() { private fun normalizeLegacyFiles() {
val jpgs = scanDir.listFiles()?.filter { it.extension == "jpg" }.orEmpty() val jpgs = scanDir.listFiles()?.filter { it.extension == "jpg" }.orEmpty()
val byId = jpgs.groupBy { file -> val byId = jpgs.groupBy { file ->