fix(archive): Reorganize names as filing does and refuses templates that lose or hide photos

Reorganize with the archive's own templates planned renames and moves for
photos just filed, and some templates could strip extensions, hide sequences
from scans or stall a dry run. Owner review 2, phase 4a findings.

- Filing and Reorganize share one context: uploads and imports name every
  photo with the sequence's camera and lens (its first photo's, or the
  creator's hint), an upload's folder from its first frame in the new
  sequence, and a missing capture time from the sequence start instead of
  the current time. The planner expands folder and title templates from the
  first frame in the sidecar ({name}, {ext}, {iso}...), never today's date.
- Titles expand as text (ExpandText): "Paris: night" stays as typed.
- A sequence whose sidecar cannot be read (torn, another sequence's) keeps
  its folder, title and names, listed with why, and so does every folder
  around it; the dry run reads every sidecar, nested ones included.
- Kept never gives one folder to two sequences of a plan whatever the case,
  and a case-only move onto another folder is refused instead of taken as
  done.
- Shared template rules (TemplateRules) for the server's Reorganize and
  archive settings and the desktop's fields: a file template must keep the
  photo's extension ("{n}{ext}" refused) and tell a session's photos apart;
  a folder template may not write a level scans skip (a leading dot,
  originals, proxies, exports). Levels a title gives are escaped with "_".
- {ext} comes from the file, or from the original name when the file lost
  a photo's extension, so a Reorganize can put it back.
- Unique names cost linear time (UniqueNames) with the same names as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 6c734777e01476881a3f34b3188571cc3f7150ab)
This commit is contained in:
Alby96 committed 2026-10-27 16:29:31 +01:00
1 parent 13c2ac321c
commit b253cac8d4
25 files changed
+777 -173

No files matched your search

+1 -1
View File
@@ -223,7 +223,7 @@
<data name="Archive.Reorganize.Blocked.InPlace" xml:space="preserve"><value>Photos kept in place outside originals keep their names.</value><comment>long: why photos keep their names in a Reorganize dry run</comment></data>
<data name="Archive.Reorganize.Blocked.Missing" xml:space="preserve"><value>Missing photos keep their names.</value><comment>long: why photos keep their names in a Reorganize dry run</comment></data>
<data name="Archive.Reorganize.Blocked.Unhashed" xml:space="preserve"><value>Photos never verified keep their names; verify the sequence first.</value><comment>long: why photos keep their names in a Reorganize dry run</comment></data>
<data name="Archive.Reorganize.Blocked.Unreadable" xml:space="preserve"><value>The sequence file cannot be read; its photos keep their names.</value><comment>long: why photos keep their names in a Reorganize dry run</comment></data>
<data name="Archive.Reorganize.Blocked.Unreadable" xml:space="preserve"><value>The sequence file cannot be read; the sequence stays as it is, and so does any folder it is in.</value><comment>long: why a sequence keeps its folder, title and photo names in a Reorganize dry run</comment></data>
<data name="Archive.Reorganize.Carried" xml:space="preserve"><value>Follows its folder</value></data>
<data name="Archive.Reorganize.Change" xml:space="preserve"><value>{0}: {1} to {2}</value><comment>long: what a screen reader says for one line of the Reorganize dry run; {0} Folder, Title or File, {1} before, {2} after</comment></data>
<data name="Archive.Reorganize.File" xml:space="preserve"><value>File</value></data>
+2
View File
@@ -38,8 +38,10 @@
<data name="Errors.Template.Empty" xml:space="preserve"><value>The template is empty.</value></data>
<data name="Errors.Template.EmptyToken" xml:space="preserve"><value>Empty token at position {1}: write a name between the braces.</value></data>
<data name="Errors.Template.FileSeparator" xml:space="preserve"><value>File names cannot contain a slash; put folders in the folder template.</value></data>
<data name="Errors.Template.Extension" xml:space="preserve"><value>The photos would lose their extension: write a dot before {ext}, or leave {ext} out.</value></data>
<data name="Errors.Template.Format" xml:space="preserve"><value>The format after the colon does not suit its token.</value></data>
<data name="Errors.Template.NotUnique" xml:space="preserve"><value>Names would repeat: add the frame number, the time or the original name.</value></data>
<data name="Errors.Template.ReservedFolder" xml:space="preserve"><value>Scans skip folders that start with a dot or are named originals, proxies or exports.</value></data>
<data name="Errors.Template.UnclosedBrace" xml:space="preserve"><value>The brace opened at position {1} is never closed.</value></data>
<data name="Errors.Template.UnknownToken" xml:space="preserve"><value>Unknown token “{0}” at position {1}.</value></data>
<data name="Errors.Template.UnopenedBrace" xml:space="preserve"><value>The closing brace at position {1} has no opening one; double it for a literal brace.</value></data>