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>
+1 -1
View File
@@ -217,7 +217,7 @@
<data name="Archive.Reorganize.Blocked.InPlace" xml:space="preserve"><value>Le foto tenute sul posto fuori da originals mantengono il loro nome.</value></data>
<data name="Archive.Reorganize.Blocked.Missing" xml:space="preserve"><value>Le foto mancanti mantengono il loro nome.</value></data>
<data name="Archive.Reorganize.Blocked.Unhashed" xml:space="preserve"><value>Le foto mai verificate mantengono il loro nome; verifica prima la sequenza.</value></data>
<data name="Archive.Reorganize.Blocked.Unreadable" xml:space="preserve"><value>Il file della sequenza non è leggibile; le sue foto mantengono il loro nome.</value></data>
<data name="Archive.Reorganize.Blocked.Unreadable" xml:space="preserve"><value>Il file della sequenza non è leggibile; la sequenza resta com'è, e così ogni cartella che la contiene.</value></data>
<data name="Archive.Reorganize.Carried" xml:space="preserve"><value>Segue la sua cartella</value></data>
<data name="Archive.Reorganize.Change" xml:space="preserve"><value>{0}: da {1} a {2}</value></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>Il modello è vuoto.</value></data>
<data name="Errors.Template.EmptyToken" xml:space="preserve"><value>Segnaposto vuoto alla posizione {1}: scrivi un nome tra le parentesi graffe.</value></data>
<data name="Errors.Template.FileSeparator" xml:space="preserve"><value>I nomi dei file non possono contenere la barra; metti le cartelle nel modello delle cartelle.</value></data>
<data name="Errors.Template.Extension" xml:space="preserve"><value>Le foto perderebbero l'estensione: scrivi un punto prima di {ext}, oppure togli {ext}.</value></data>
<data name="Errors.Template.Format" xml:space="preserve"><value>Il formato dopo i due punti non è adatto al suo segnaposto.</value></data>
<data name="Errors.Template.NotUnique" xml:space="preserve"><value>I nomi si ripeterebbero: aggiungi il numero del fotogramma, l'ora o il nome originale.</value></data>
<data name="Errors.Template.ReservedFolder" xml:space="preserve"><value>Le scansioni saltano le cartelle che iniziano con un punto o si chiamano originals, proxies o exports.</value></data>
<data name="Errors.Template.UnclosedBrace" xml:space="preserve"><value>La parentesi graffa aperta alla posizione {1} non viene mai chiusa.</value></data>
<data name="Errors.Template.UnknownToken" xml:space="preserve"><value>Segnaposto sconosciuto «{0}» alla posizione {1}.</value></data>
<data name="Errors.Template.UnopenedBrace" xml:space="preserve"><value>La parentesi graffa chiusa alla posizione {1} non ha un'apertura; raddoppiala per una graffa letterale.</value></data>