fix(server): keep convert dry runs like Reorganize's, say what a new sequence lacks

The convert endpoint planned the whole selection inside the HTTP request, again for
every mode, quality keystroke and confirmation, with no limit: behind a proxy an
all-sequence conversion could never get past its dry run or its apply.

- ReorganizePlanCache becomes PlanCache, shared by Reorganize and Convert: one plan
  per key made apart from the request, two at once across both kinds, eight kept,
  15-minute timeout, 5-minute lifetime, 503 plan_dropped. Keys are typed records
  (ReorganizePlanKey, ConvertPlanKey) that also say which exceptions are refusals.
- A conversion plan is keyed by archive, a convert stamp of the index
  (SequenceRepository.GetConvertStampAsync: the Reorganize stamp plus, per planned
  sequence, the photos' count, sizes, formats, pixel sizes and missing, corrupt,
  preview-only and undecodable flags), the sequences and the target with the
  quality that counts. Not the mode: the request's mode and options are set on the
  kept plan, and the free space is measured again at every request through the
  engine. A plan made while the volume was away is not kept (503 archive_offline).
- New sequence holds the converted copies alone: the dry run says the skipped
  photos are not copied into it (Archive.Convert.NotCopied.*, Server.Convert.OnPcNew),
  the panel's totals, column and confirmation give the count, and so does the
  desktop's summary.
- Panel: the preview is asked in Replace's neutral words; a dry run cut off by a
  proxy is asked again while the totals show how long it takes, plan_dropped is
  retried once; an apply the server let go plans again, a changed one shows
  Admin.Convert.PlanChanged, and one with no answer is not resent (its job may be
  queued).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f0b1e379ce7c08b6d3459ab25ca6214c8f366f6c)
This commit is contained in:
Alby96 committed 2026-10-27 22:15:51 +01:00
1 parent d0bbd77c92
commit 8174852a2c
22 files changed
+927 -342

No files matched your search

+8 -1
View File
@@ -92,6 +92,7 @@
<data name="Admin.Convert.ChooseMode" xml:space="preserve"><value>Choose Replace or New sequence to convert.</value><comment>long</comment></data>
<data name="Admin.Convert.ChooseMode.Tip" xml:space="preserve"><value>Choose Replace or New sequence first</value></data>
<data name="Admin.Convert.Column.Converted" xml:space="preserve"><value>Converted</value></data>
<data name="Admin.Convert.Column.NotCopied" xml:space="preserve"><value>Not copied</value></data>
<data name="Admin.Convert.Column.Sequence" xml:space="preserve"><value>Sequence</value></data>
<data name="Admin.Convert.Column.Size" xml:space="preserve"><value>Size</value></data>
<data name="Admin.Convert.Column.Unchanged" xml:space="preserve"><value>Unchanged</value></data>
@@ -101,6 +102,8 @@
<data name="Admin.Convert.Confirm.Replace.Tip" xml:space="preserve"><value>Queue the job that converts the photos, verifies each conversion and moves the originals to the trash</value></data>
<data name="Admin.Convert.ConfirmNew.one" xml:space="preserve"><value>{0} photo is converted into a copy in a new sequence; the original stays as it is.</value><comment>long</comment></data>
<data name="Admin.Convert.ConfirmNew.other" xml:space="preserve"><value>{0} photos are converted into copies in a new sequence beside each one; the originals stay as they are.</value><comment>long</comment></data>
<data name="Admin.Convert.ConfirmNewNotCopied.one" xml:space="preserve"><value>{0} photo is not copied into the new sequence, for the reason the preview gives.</value><comment>long</comment></data>
<data name="Admin.Convert.ConfirmNewNotCopied.other" xml:space="preserve"><value>{0} photos are not copied into the new sequences, for the reasons the preview gives.</value><comment>long</comment></data>
<data name="Admin.Convert.ConfirmNewTitle" xml:space="preserve"><value>Convert to {0} in new sequences?</value><comment>long</comment></data>
<data name="Admin.Convert.ConfirmReplace.one" xml:space="preserve"><value>{0} photo in {1} is replaced by its conversion; the original goes to the trash, restorable until it is emptied.</value><comment>long</comment></data>
<data name="Admin.Convert.ConfirmReplace.other" xml:space="preserve"><value>{0} photos in {1} are replaced by their conversions; the originals go to the trash, restorable until it is emptied.</value><comment>long</comment></data>
@@ -118,14 +121,17 @@
<data name="Admin.Convert.Mode.NewSequence.Tip" xml:space="preserve"><value>The converted copies go into a new sequence beside each one; the originals and their sequence stay exactly as they are</value></data>
<data name="Admin.Convert.Mode.Replace" xml:space="preserve"><value>Replace</value></data>
<data name="Admin.Convert.Mode.Replace.Tip" xml:space="preserve"><value>The converted files become the sequence's photos; the originals go to the archive's trash, restorable until it is emptied</value></data>
<data name="Admin.Convert.NoAnswer" xml:space="preserve"><value>The server did not answer: check on the Jobs page whether the conversion was queued before converting again.</value><comment>long</comment></data>
<data name="Admin.Convert.NoSpace.Tip" xml:space="preserve"><value>Free some space on the archive's volume first</value></data>
<data name="Admin.Convert.Nothing.Tip" xml:space="preserve"><value>Nothing in the preview converts</value></data>
<data name="Admin.Convert.NothingToConvert" xml:space="preserve"><value>Nothing to convert: every photo stays as it is, for the reasons shown.</value><comment>long</comment></data>
<data name="Admin.Convert.OpenJob" xml:space="preserve"><value>Open job</value></data>
<data name="Admin.Convert.OpenJob.Tip" xml:space="preserve"><value>Show the job and its log on the Jobs page</value></data>
<data name="Admin.Convert.PlanItem" xml:space="preserve"><value>{0} · {1} · {2}</value><comment>invariant; a sequence's title, the photos it converts, and their size before and after</comment></data>
<data name="Admin.Convert.PlanChanged" xml:space="preserve"><value>The archive changed during the confirmation; check the new preview and apply again.</value><comment>long</comment></data>
<data name="Admin.Convert.PlanChanged" xml:space="preserve"><value>The archive changed since the preview; check the new one and apply again.</value><comment>long</comment></data>
<data name="Admin.Convert.Planning" xml:space="preserve"><value>Planning…</value></data>
<data name="Admin.Convert.Planning.Tip" xml:space="preserve"><value>The server reads every photo folder of the selection: a large archive takes minutes, and the preview appears once it is done</value></data>
<data name="Admin.Convert.PlanningFor" xml:space="preserve"><value>Planning… {0}</value><comment>{0} how long the dry run has taken so far, e.g. "2 min"</comment></data>
<data name="Admin.Convert.Preview" xml:space="preserve"><value>Preview</value></data>
<data name="Admin.Convert.Preview.Tip" xml:space="preserve"><value>What each sequence converts and leaves as it is, with the size before and after (an estimate); nothing has changed yet</value></data>
<data name="Admin.Convert.Quality" xml:space="preserve"><value>Quality</value></data>
@@ -141,6 +147,7 @@
<data name="Admin.Convert.TitleAll" xml:space="preserve"><value>Convert all sequences</value></data>
<data name="Admin.Convert.TooMany" xml:space="preserve"><value>Convert takes at most {0} sequences at once, or every sequence: clear the filters and select all.</value><comment>long</comment></data>
<data name="Admin.Convert.Totals" xml:space="preserve"><value>Sequences converted: {0} · photos: {1} · unchanged: {2} · size: {3} → {4}</value><comment>long</comment></data>
<data name="Admin.Convert.TotalsNew" xml:space="preserve"><value>Sequences converted: {0} · photos: {1} · not copied: {2} · size: {3} → {4}</value><comment>long: the totals with New sequence chosen; {2} the photos the new sequences lack</comment></data>
<data name="Admin.Dashboard.Activity" xml:space="preserve"><value>Recent activity</value></data>
<data name="Admin.Dashboard.AllLogs" xml:space="preserve"><value>All logs</value></data>
<data name="Admin.Dashboard.AllLogs.Tip" xml:space="preserve"><value>Open the audit log</value></data>
+8
View File
@@ -59,6 +59,14 @@
<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.NewSequence" xml:space="preserve"><value>New sequence</value></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>
<data name="Archive.Convert.NotCopied.SameFormat" xml:space="preserve"><value>Photos already in this format 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.Undecodable" xml:space="preserve"><value>Unreadable 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.Unhashed" xml:space="preserve"><value>Photos never verified are not copied into the new sequence; verify the sequence first.</value><comment>long: why photos are not in the new sequence a conversion makes, in its dry run</comment></data>
<data name="Archive.Convert.NotCopiedPhotos.one" 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.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.Quality" xml:space="preserve"><value>Quality</value></data>
+1
View File
@@ -24,6 +24,7 @@
<data name="Server.Conflict.TakeServer.Title" xml:space="preserve"><value>Take the server's settings?</value></data>
<data name="Server.Connect" xml:space="preserve"><value>Connect</value></data>
<data name="Server.Convert.OnPc" xml:space="preserve"><value>Convert these photos on a PC: the server cannot read them at full resolution.</value><comment>long: why photos are not converted in a conversion dry run on the server</comment></data>
<data name="Server.Convert.OnPcNew" xml:space="preserve"><value>Not copied into the new sequence: the server cannot read these photos at full resolution; convert them on a PC.</value><comment>long: why photos are not in the new sequence a conversion on the server makes, in its dry run</comment></data>
<data name="Server.Disconnect" xml:space="preserve"><value>Disconnect</value></data>
<data name="Server.Empty" xml:space="preserve"><value>Not connected to a server</value></data>
<data name="Server.Error.AccountLocked" xml:space="preserve"><value>Too many failed sign-ins; the account is locked for a while.</value><comment>long</comment></data>
+8 -1
View File
@@ -92,6 +92,7 @@
<data name="Admin.Convert.ChooseMode" xml:space="preserve"><value>Scegli Sostituisci o Nuova sequenza per convertire.</value></data>
<data name="Admin.Convert.ChooseMode.Tip" xml:space="preserve"><value>Prima scegli Sostituisci o Nuova sequenza</value></data>
<data name="Admin.Convert.Column.Converted" xml:space="preserve"><value>Convertite</value></data>
<data name="Admin.Convert.Column.NotCopied" xml:space="preserve"><value>Non copiate</value></data>
<data name="Admin.Convert.Column.Sequence" xml:space="preserve"><value>Sequenza</value></data>
<data name="Admin.Convert.Column.Size" xml:space="preserve"><value>Dimensione</value></data>
<data name="Admin.Convert.Column.Unchanged" xml:space="preserve"><value>Invariate</value></data>
@@ -101,6 +102,8 @@
<data name="Admin.Convert.Confirm.Replace.Tip" xml:space="preserve"><value>Metti in coda il job che converte le foto, verifica ogni conversione e sposta gli originali nel cestino</value></data>
<data name="Admin.Convert.ConfirmNew.one" xml:space="preserve"><value>{0} foto viene convertita in una copia in una nuova sequenza; l'originale resta com'è.</value></data>
<data name="Admin.Convert.ConfirmNew.other" xml:space="preserve"><value>{0} foto vengono convertite in copie, in una nuova sequenza accanto a ognuna; gli originali restano come sono.</value></data>
<data name="Admin.Convert.ConfirmNewNotCopied.one" xml:space="preserve"><value>{0} foto non viene copiata nella nuova sequenza, per il motivo indicato nell'anteprima.</value></data>
<data name="Admin.Convert.ConfirmNewNotCopied.other" xml:space="preserve"><value>{0} foto non vengono copiate nelle nuove sequenze, per i motivi indicati nell'anteprima.</value></data>
<data name="Admin.Convert.ConfirmNewTitle" xml:space="preserve"><value>Convertire in {0} in nuove sequenze?</value></data>
<data name="Admin.Convert.ConfirmReplace.one" xml:space="preserve"><value>{0} foto in {1} viene sostituita dalla sua conversione; l'originale va nel cestino, ripristinabile finché non viene svuotato.</value></data>
<data name="Admin.Convert.ConfirmReplace.other" xml:space="preserve"><value>{0} foto in {1} vengono sostituite dalle loro conversioni; gli originali vanno nel cestino, ripristinabili finché non viene svuotato.</value></data>
@@ -116,13 +119,16 @@
<data name="Admin.Convert.Mode.NewSequence.Tip" xml:space="preserve"><value>Le copie convertite vanno in una nuova sequenza accanto a ognuna; gli originali e la loro sequenza restano esattamente come sono</value></data>
<data name="Admin.Convert.Mode.Replace" xml:space="preserve"><value>Sostituisci</value></data>
<data name="Admin.Convert.Mode.Replace.Tip" xml:space="preserve"><value>I file convertiti diventano le foto della sequenza; gli originali vanno nel cestino dell'archivio, ripristinabili finché non viene svuotato</value></data>
<data name="Admin.Convert.NoAnswer" xml:space="preserve"><value>Il server non ha risposto: controlla nella pagina Attività se la conversione è stata accodata prima di convertire di nuovo.</value></data>
<data name="Admin.Convert.NoSpace.Tip" xml:space="preserve"><value>Prima libera spazio sul volume dell'archivio</value></data>
<data name="Admin.Convert.Nothing.Tip" xml:space="preserve"><value>Nell'anteprima non c'è niente da convertire</value></data>
<data name="Admin.Convert.NothingToConvert" xml:space="preserve"><value>Niente da convertire: ogni foto resta com'è, per i motivi indicati.</value></data>
<data name="Admin.Convert.OpenJob" xml:space="preserve"><value>Apri job</value></data>
<data name="Admin.Convert.OpenJob.Tip" xml:space="preserve"><value>Mostra il job e il suo log nella pagina Job</value></data>
<data name="Admin.Convert.PlanChanged" xml:space="preserve"><value>L'archivio è cambiato durante la conferma; controlla la nuova anteprima e applica di nuovo.</value></data>
<data name="Admin.Convert.PlanChanged" xml:space="preserve"><value>L'archivio è cambiato dopo l'anteprima; controlla quella nuova e applica di nuovo.</value></data>
<data name="Admin.Convert.Planning" xml:space="preserve"><value>Pianificazione…</value></data>
<data name="Admin.Convert.Planning.Tip" xml:space="preserve"><value>Il server legge ogni cartella di foto della selezione: un archivio grande richiede minuti, e l'anteprima compare quando ha finito</value></data>
<data name="Admin.Convert.PlanningFor" xml:space="preserve"><value>Pianificazione… {0}</value></data>
<data name="Admin.Convert.Preview" xml:space="preserve"><value>Anteprima</value></data>
<data name="Admin.Convert.Preview.Tip" xml:space="preserve"><value>Cosa converte e cosa lascia com'è ogni sequenza, con la dimensione prima e dopo (una stima); niente è ancora cambiato</value></data>
<data name="Admin.Convert.Quality" xml:space="preserve"><value>Qualità</value></data>
@@ -137,6 +143,7 @@
<data name="Admin.Convert.TitleAll" xml:space="preserve"><value>Converti tutte le sequenze</value></data>
<data name="Admin.Convert.TooMany" xml:space="preserve"><value>Converti al massimo {0} sequenze alla volta, o tutte: togli i filtri e seleziona tutto.</value></data>
<data name="Admin.Convert.Totals" xml:space="preserve"><value>Sequenze convertite: {0} · foto: {1} · invariate: {2} · dimensione: {3} → {4}</value></data>
<data name="Admin.Convert.TotalsNew" xml:space="preserve"><value>Sequenze convertite: {0} · foto: {1} · non copiate: {2} · dimensione: {3} → {4}</value></data>
<data name="Admin.Dashboard.Activity" xml:space="preserve"><value>Attività recenti</value></data>
<data name="Admin.Dashboard.AllLogs" xml:space="preserve"><value>Tutti i log</value></data>
<data name="Admin.Dashboard.AllLogs.Tip" xml:space="preserve"><value>Apri il registro di controllo</value></data>
+8
View File
@@ -56,6 +56,14 @@
<data name="Archive.Convert.HeadingAll" xml:space="preserve"><value>Converti {0}</value></data>
<data name="Archive.Convert.Mode" xml:space="preserve"><value>Modalità</value></data>
<data name="Archive.Convert.NewSequence" xml:space="preserve"><value>Nuova sequenza</value></data>
<data name="Archive.Convert.NotCopied.Missing" xml:space="preserve"><value>Le foto mancanti non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.NoNativeDecoder" xml:space="preserve"><value>Le foto di un formato che questo computer non legge a piena risoluzione non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.PreviewOnly" xml:space="preserve"><value>Le foto lette qui solo dalla loro anteprima incorporata non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.SameFormat" xml:space="preserve"><value>Le foto già in questo formato non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.Undecodable" xml:space="preserve"><value>Le foto illeggibili non vengono copiate nella nuova sequenza.</value></data>
<data name="Archive.Convert.NotCopied.Unhashed" xml:space="preserve"><value>Le foto mai verificate non vengono copiate nella nuova sequenza; verifica prima la sequenza.</value></data>
<data name="Archive.Convert.NotCopiedPhotos.one" xml:space="preserve"><value>{0:N0} non copiata</value></data>
<data name="Archive.Convert.NotCopiedPhotos.other" xml:space="preserve"><value>{0:N0} non copiate</value></data>
<data name="Archive.Convert.NotPlaced" xml:space="preserve"><value>Le foto convertite non hanno potuto prendere il loro posto. {0}</value></data>
<data name="Archive.Convert.PhotoFailed" xml:space="preserve"><value>Impossibile convertire {0}. {1}</value></data>
<data name="Archive.Convert.Quality" xml:space="preserve"><value>Qualità</value></data>
+1
View File
@@ -22,6 +22,7 @@
<data name="Server.Conflict.TakeServer.Title" xml:space="preserve"><value>Usare le impostazioni del server?</value></data>
<data name="Server.Connect" xml:space="preserve"><value>Connetti</value></data>
<data name="Server.Convert.OnPc" xml:space="preserve"><value>Converti queste foto su un PC: il server non le legge a piena risoluzione.</value></data>
<data name="Server.Convert.OnPcNew" xml:space="preserve"><value>Non copiate nella nuova sequenza: il server non legge queste foto a piena risoluzione; convertile su un PC.</value></data>
<data name="Server.Disconnect" xml:space="preserve"><value>Disconnetti</value></data>
<data name="Server.Empty" xml:space="preserve"><value>Non connesso a un server</value></data>
<data name="Server.Error.AccountLocked" xml:space="preserve"><value>Troppi accessi falliti; l'account è bloccato per un po'.</value></data>