Files
Oxicloud/src
DioCrafts 6f483fd684 fix(photos): recover EXIF GPS via nom-exif when kamadak-exif fails
Geotagged photos never appeared in Photos → Places because their GPS was
silently dropped. Capture-metadata extraction read GPS/camera/dimensions
only from kamadak-exif, which rejects many real-world EXIF blocks (phones,
photo editors, anything with a non-standard trailing IFD) with
`InvalidFormat("Unexpected next IFD")` and returns nothing. nom-exif —
already used to upgrade the capture date and far more lenient — parses those
same files fine, so only the date survived and latitude/longitude stayed
NULL.

nom-exif now also reads GPS (and the date) and `merge_image_metadata`
combines both sources:
- nom-exif's tz-correct date wins when present (unchanged behaviour);
- nom-exif's GPS only fills gaps kamadak left, so kamadak still wins when it
  parsed the file (no regression);
- when kamadak fails outright, a record is still produced from nom-exif's
  date/GPS instead of being discarded.

Existing photos can be backfilled via POST /api/admin/photos/metadata/reextract.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 21:48:03 +02:00
..