fix(convert): the job converts exactly the photos its preview listed, once

A conversion job could still do something its confirmed dry run did not show,
or refuse what it should have converted:

- An upload landing between the confirmation and the sequence's turn made the
  sequence Changed at every retry. Each ConvertSequence now names the photos
  the plan converts (Photos, their frame ids); the job takes those from its
  re-plan, checks their content against the confirmed digest and leaves photos
  that came in since as they are. A photo the plan did not list is never
  converted, whatever changed on disk or in the index since the dry run.
- A file another program held during the dry run was planned as Missing and
  then converted or not depending on the re-plan. It is now its own reason
  (inaccessible, "held open or cannot be opened"); a truncated file reads as
  undecodable. At job time a confirmed photo that cannot be opened leaves the
  sequence Blocked for the retry; a held photo the job does not convert does
  not hide a real change.
- The same sequences could be converted twice (two dialogs or tabs, a lost
  answer, no dry run at all). MassConverter.QueueAsync checks the queued,
  running and paused conversions and queues under one lock, in the caller's
  context (the desktop's enqueue shows a toast on the UI thread); a job's own
  re-plan treats sequences of conversions queued before it as busy.
- The per-photo space check reserved a full batch of photos even when fewer
  were left, so a job whose preview had the space could stop at every retry.
  It now reserves the photo and those after it that may convert at once.
- New sequence now says in the dry run, the panel's totals and confirmation,
  and a new desktop confirmation, how many photos each new sequence lacks;
  only sequences that are copied use those words.
- On the server, a confirmation takes only the plan kept for the index as it
  is now (503 plan_dropped otherwise, never a plan made inside the request),
  and busy sequences and free space are as they are at every request. The
  panel's Apply asks the dry run again first, with Close still available,
  and confirms only the same fingerprint.
- Maintenance keeps another host's conversion staging as long as its journal
  and purges both together; the unstaged-copy failure and blocked sequences
  are logged in catalog sentences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit fefd9c34ebfeed1f9e84161610ef286026d38355)
This commit is contained in:
Alby96 committed 2026-11-02 10:33:34 +01:00
1 parent 5b5acaf307
commit c669d0504d
25 files changed
+1307 -226

No files matched your search

+12 -1
View File
@@ -37,10 +37,12 @@
<data name="Archive.Confirm.Remove" xml:space="preserve"><value>Remove row</value></data>
<data name="Archive.Confirm.RemoveHeading" xml:space="preserve"><value>Remove {0} from the index?</value><comment>long</comment></data>
<data name="Archive.Confirm.RemoveMessage" xml:space="preserve"><value>Its sidecar is gone. Only the index row is removed; no file is deleted.</value><comment>long</comment></data>
<data name="Archive.Convert.AlreadyQueued" xml:space="preserve"><value>A conversion of these sequences is already waiting or running; follow it in Jobs.</value><comment>long: error sentence; nothing was queued</comment></data>
<data name="Archive.Convert.Blocked.Busy" xml:space="preserve"><value>A job is working on this sequence; convert it once the job is done.</value><comment>long: why a sequence is not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Blocked.FramesChanged" xml:space="preserve"><value>The sequence changed after the plan; review the plan again.</value><comment>long: why a sequence is not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Blocked.Offline" xml:space="preserve"><value>The archive is offline or read-only.</value><comment>long: why a sequence is not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Blocked.Unreadable" xml:space="preserve"><value>The sequence file cannot be read.</value><comment>long: why a sequence is not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Confirm" xml:space="preserve"><value>Convert</value></data>
<data name="Archive.Convert.Done.one" xml:space="preserve"><value>{0:N0} sequence converted</value></data>
<data name="Archive.Convert.Done.other" xml:space="preserve"><value>{0:N0} sequences converted</value></data>
<data name="Archive.Convert.Failed.Changed" xml:space="preserve"><value>The photo no longer matches the copy that was archived; verify the sequence.</value><comment>long: why a photo was not converted, in the job log</comment></data>
@@ -58,9 +60,15 @@
<data name="Archive.Convert.Heading.other" xml:space="preserve"><value>Convert {0:N0} sequences</value></data>
<data name="Archive.Convert.HeadingAll" xml:space="preserve"><value>Convert {0}</value><comment>long: dialog heading; {0} archive name</comment></data>
<data name="Archive.Convert.Mode" xml:space="preserve"><value>Mode</value></data>
<data name="Archive.Convert.NewHeading.one" xml:space="preserve"><value>Convert {0:N0} sequence into a new one?</value><comment>long</comment></data>
<data name="Archive.Convert.NewHeading.other" xml:space="preserve"><value>Convert {0:N0} sequences into new ones?</value><comment>long</comment></data>
<data name="Archive.Convert.NewLeftOut.one" xml:space="preserve"><value>{0:N0} photo is not copied: it stays in its source alone, for the reason the plan gives.</value><comment>long: the photos a conversion into new sequences leaves out of them</comment></data>
<data name="Archive.Convert.NewLeftOut.other" xml:space="preserve"><value>{0:N0} photos are not copied: they stay in their source alone, for the reasons the plan gives.</value><comment>long: the photos a conversion into new sequences leaves out of them</comment></data>
<data name="Archive.Convert.NewMessage" xml:space="preserve"><value>{0} ({1}) are converted to {2} into a new sequence beside each source; the originals stay as they are.</value><comment>long: {0} photos, e.g. "120 photos"; {1} their size; {2} the format, e.g. "Linear DNG"</comment></data>
<data name="Archive.Convert.NewSequence" xml:space="preserve"><value>New sequence</value></data>
<data name="Archive.Convert.NotCopied.ColorProfile" xml:space="preserve"><value>Photos whose colour profile this format can neither keep nor convert are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.EightBit" xml:space="preserve"><value>RAW photos this computer develops at 8 bits only are not copied into the new sequence; JPEG converts them.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.Inaccessible" xml:space="preserve"><value>Photos another program holds open, or that cannot be opened, are not copied into the new sequence; plan again once they are free.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.Missing" xml:space="preserve"><value>Missing photos are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.NoNativeDecoder" xml:space="preserve"><value>Photos of a format this computer cannot read at full resolution are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopied.PreviewOnly" xml:space="preserve"><value>Photos read only from their embedded preview here are not copied into the new sequence.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
@@ -72,6 +80,7 @@
<data name="Archive.Convert.NotCopiedPhotos.other" xml:space="preserve"><value>{0:N0} not copied</value><comment>photos a conversion into a new sequence leaves out of it</comment></data>
<data name="Archive.Convert.NotPlaced" xml:space="preserve"><value>The converted photos could not take their place. {0}</value><comment>long: job log; {0} why (one sentence)</comment></data>
<data name="Archive.Convert.PhotoFailed" xml:space="preserve"><value>{0} could not be converted. {1}</value><comment>long: job log; {0} the photo's file, {1} why (one sentence)</comment></data>
<data name="Archive.Convert.PhotoHeld" xml:space="preserve"><value>A photo of it is held open by another program or cannot be opened; retry once it is free.</value><comment>long: job log, why a sequence was left as it was (one sentence)</comment></data>
<data name="Archive.Convert.Quality" xml:space="preserve"><value>Quality</value></data>
<data name="Archive.Convert.Replace" xml:space="preserve"><value>Replace</value></data>
<data name="Archive.Convert.ReplaceHeading.one" xml:space="preserve"><value>Replace the photos of {0:N0} sequence?</value><comment>long</comment></data>
@@ -80,6 +89,7 @@
<data name="Archive.Convert.Sizes" xml:space="preserve"><value>{0} → {1}</value><comment>sizes before and after a conversion</comment></data>
<data name="Archive.Convert.Skipped.ColorProfile" xml:space="preserve"><value>Photos whose colour profile this format can neither keep nor convert stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.EightBit" xml:space="preserve"><value>RAW photos this computer develops at 8 bits only stay as they are; JPEG converts them.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.Inaccessible" xml:space="preserve"><value>Photos another program holds open, or that cannot be opened, stay as they are; plan again once they are free.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.Missing" xml:space="preserve"><value>Missing photos stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.NoNativeDecoder" xml:space="preserve"><value>Photos of a format this computer cannot read at full resolution stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
<data name="Archive.Convert.Skipped.PreviewOnly" xml:space="preserve"><value>Photos read only from their embedded preview here stay as they are.</value><comment>long: why photos are not converted in a conversion dry run</comment></data>
@@ -101,6 +111,7 @@
<data name="Archive.Convert.Undone.other" xml:space="preserve"><value>Originals back in {0:N0} sequences</value><comment>long</comment></data>
<data name="Archive.Convert.UndoneNew.one" xml:space="preserve"><value>{0:N0} sequence had changed since: its originals came back as a new sequence.</value><comment>long</comment></data>
<data name="Archive.Convert.UndoneNew.other" xml:space="preserve"><value>{0:N0} sequences had changed since: their originals came back as new sequences.</value><comment>long</comment></data>
<data name="Archive.Convert.Unstaged" xml:space="preserve"><value>The conversion of {0} is no longer among the staged files; the retry converts it again.</value><comment>long: job log, why a new sequence was not made (one sentence); {0} the photo's file</comment></data>
<data name="Archive.Copy.Title" xml:space="preserve"><value>Folder to copy into the archive</value><comment>long</comment></data>
<data name="Archive.Delete.Action" xml:space="preserve"><value>Move to trash</value></data>
<data name="Archive.Delete.Blocked" xml:space="preserve"><value>Not moved: {0} · {1}</value><comment>long</comment></data>
@@ -207,7 +218,7 @@
<data name="Archive.Log.AuditPurged" xml:space="preserve"><value>Audit entries removed: {0}</value><comment>long: job log line</comment></data>
<data name="Archive.Log.BackupDone" xml:space="preserve"><value>Index copied to {0} ({1}); copies kept: {2}</value><comment>long: job log line; {0} file path; {1} size, e.g. "12.4 MB"</comment></data>
<data name="Archive.Log.ConvertBlocked" xml:space="preserve"><value>Left as it was, busy or unreadable: {0}</value><comment>long: job log line; {0} sequence title</comment></data>
<data name="Archive.Log.ConvertChanged" xml:space="preserve"><value>Left as it was, changed after the plan: {0}</value><comment>long: job log line; {0} sequence title</comment></data>
<data name="Archive.Log.ConvertChanged" xml:space="preserve"><value>Left as it was, changed after the plan: {0}. A retry leaves it as it is: convert it again from a new plan.</value><comment>long: job log line; {0} sequence title</comment></data>
<data name="Archive.Log.ConvertDone" xml:space="preserve"><value>Sequences converted: {0}, new sequences: {1}, photos: {2}</value><comment>long: job log line of a conversion</comment></data>
<data name="Archive.Log.ConvertFailed" xml:space="preserve"><value>Left as it was: {0}. {1}</value><comment>long: job log line; {0} sequence title, {1} what failed and why (sentences)</comment></data>
<data name="Archive.Log.ConvertLeftOut" xml:space="preserve"><value>{0}: photos not converted, left in the source alone: {1}</value><comment>long: job log line after a conversion into a new sequence; {0} sequence title, {1} photos</comment></data>