Skip to content

Add Catalog Columns and DB-Backed Live Photo Pairing #274

Closed

Description

@ptr727

The iCloud source is moving to a flat rclone mirror. There a Live Photo's still and motion video often have different file names, because a colliding name gets an asset id inserted before the extension. After import by EXIF date the pair can also land in different date folders.

DeleteLivePhotosAsync only finds the still by a same-folder, same-stem name, so such videos are silently kept. process is also a single parallel pass, so a video can be judged before its still has been seen.

Planned change:

  • Add nullable content_identifier and image_hash columns, both indexed, plus a metadata_read flag, to the files table. Existing databases upgrade in place and backfill on the next catalog.
  • Fill the columns in IndexTask.IndexFileAsync with one exiftool run (-ImageDataHash -api ImageHashType=SHA256). index, import and process all use this path.
  • Make process two-phase: catalog every file first, then run the per-file pipeline.
  • With --db, find the still of a Live Photo video by content_identifier among image rows, whatever its name or folder, including a still whose file is gone. Without --db the same-folder name lookup is unchanged.
  • The image hash is catalog-only. Import dedup stays on the whole-file SHA-256.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions