mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-22 03:33:22 -05:00
Saving (Cmd+S or auto-write) now merges LightCraft's properties into an existing sidecar (lightcraft_meta::merge_xmp): owned properties (rating, label, dc/IPTC/rights fields, lc:*) are replaced or removed, capture time and GPS only when LightCraft has a value; everything else (crs:, xmpMM:History, unknown namespaces, packet wrapper) is kept byte for byte. The result is re-parsed and checked before it is written (temp + fsync + rename). A sidecar that isn't valid XMP is copied to .xmp.bak-<time> (never overwriting) before it is replaced; one that can't be read at all is left alone and the save fails. Shared stems: when several catalogued files map to one stem sidecar (IMG.CR3 + IMG.JPG), it belongs to the raw (else the first by name) and the others write and read <file>.xmp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>