feat/photorenamer-live-photo #5

Merged
ludovic.terrier merged 4 commits from feat/photorenamer-live-photo into master 2026-11-11 09:14:59 +01:00
Owner
No description provided.
A MOV uses Keys:CreationDate (local time with an offset) because its CreateDate is UTC. An MP4 only has a QuickTime date. The tests use tiny HEIC, MOV and MP4 fixtures.
A Live Photo exports as IMG_1.HEIC plus IMG_1.MOV. The two dates can differ
by one second, so the pair got two different stems and the link between
them was lost.

A MOV now takes the final stem of a HEIC, HEIF or JPEG with the same stem
in its folder, if that image is renamed. The model label comes from the
image. Otherwise the MOV keeps its own date name.

Design: the main loop handles all non-MOV files first, then all MOV files.
An image that has a MOV sibling records its final stem in a temp file.
The record uses the name after the -N burst counter, so two pairs in the
same second keep their own video. The MOV reads the record and renames
with that stem. A recorded name is not read back from the filesystem,
because the image is already renamed in write mode. The image rename logic
is unchanged. HEIC and HEIF win over JPEG when two images share a stem.
A dry run does not show -N numbering, as before.
An MP4 has no local date tag, so its name can sit hours away from a photo taken at the same moment. The test pins the rule: no timezone conversion, also when TZ is set.
The pair lookup splits on a tab. A tab in an image name let an unrelated MOV take a part of that name as its stem. A name with a tab or a newline is now not paired. The sibling test also compares the exact stem, so IMG_1.foo.MOV is not a sibling of IMG_1.HEIC.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ludovic.terrier/scripts!5
No description provided.