feat: owner review 2 phase 4b: mass conversion after import (#13)
CI / Build and test (push) Failing after 3m1s
CI / PostgreSQL 16 integration (push) Skipped
CI / PostgreSQL 17 integration (push) Skipped
CI / Docker image (push) Skipped
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 10s
Release / Build, test and publish (push) Successful in 15m31s
Release / Server image (push) Successful in 1m13s
CI / Build and test (push) Failing after 3m1s
CI / PostgreSQL 16 integration (push) Skipped
CI / PostgreSQL 17 integration (push) Skipped
CI / Docker image (push) Skipped
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 10s
Release / Build, test and publish (push) Successful in 15m31s
Release / Server image (push) Successful in 1m13s
Convert photos already in the archive to JPEG, TIFF-16 or Linear DNG, from the panel's Library and the desktop's Archive and Library. Each run asks Replace (same frames, originals to the trash, recoverable) or New sequence. A dry run lists what converts, what is skipped and why, size before and after, and free space; the job converts exactly the confirmed photos, resumes, and commits all or nothing per sequence. A conversion never changes what Chronos reads from a photo. Replaced originals are erased only on the archive's own word that their conversion is gone. Desktop TIFFs that WIC showed black or as noise now go to the managed reader; the Edit picker no longer spins a core. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #13.
This commit is contained in:
1 parent
7e4a3b481d
commit
efa87f68ce
354 files changed
+24530
-843
No files matched your search
@@ -38,15 +38,24 @@ public static class TrashEmptyPlans
|
||||
/// <summary>"Photos", "Sequence", "Replaced".</summary>
|
||||
public static string KindText(TrashKind kind) => Loc.L("Archive.Trash.Kind." + kind);
|
||||
|
||||
/// <summary>The confirmation of erasing the planned entries for good; null when the plan holds none.</summary>
|
||||
/// <summary>
|
||||
/// The confirmation of erasing the planned entries for good; null when the plan holds none. An entry of replaced originals
|
||||
/// whose conversion was deleted since says so (<see cref="TrashEntry.ConversionDeleted"/>): erasing it may erase the last
|
||||
/// copy of those photos, so every such entry is named first, with why, wherever the trash lists it; the other entries
|
||||
/// fill the lines left (<see cref="DeletePlans.ListedLines"/>) and the rest are counted.
|
||||
/// </summary>
|
||||
public static ConfirmRequest? Request(TrashEmptyPlan plan)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(plan);
|
||||
if (plan.Entries.Count == 0) return null;
|
||||
var count = plan.Entries.Count.ToString(CultureInfo.InvariantCulture);
|
||||
var lines = plan.Entries.Take(DeletePlans.ListedLines).Select(e => Loc.L("Archive.Delete.Line", e.Title,
|
||||
KindText(e.Kind) + Loc.Separator + Loc.Plural("Shell.Status.Photos", e.Frames), Formatting.Bytes(e.Bytes))).ToList();
|
||||
if (plan.Entries.Count > DeletePlans.ListedLines) lines.Add(Loc.Plural("Archive.Delete.More", plan.Entries.Count - DeletePlans.ListedLines));
|
||||
var lastCopies = plan.Entries.Where(e => e.ConversionDeleted).ToList();
|
||||
var others = plan.Entries.Where(e => !e.ConversionDeleted).ToList();
|
||||
var listed = Math.Max(0, DeletePlans.ListedLines - lastCopies.Count);
|
||||
var lines = lastCopies.Concat(others.Take(listed)).Select(e => Loc.L("Archive.Delete.Line", e.Title,
|
||||
KindText(e.Kind) + Loc.Separator + Loc.Plural("Shell.Status.Photos", e.Frames)
|
||||
+ (e.ConversionDeleted ? Loc.Separator + Loc.L("Archive.Trash.ConversionDeleted") : string.Empty), Formatting.Bytes(e.Bytes))).ToList();
|
||||
if (others.Count > listed) lines.Add(Loc.Plural("Archive.Delete.More", others.Count - listed));
|
||||
return new ConfirmRequest
|
||||
{
|
||||
Heading = Loc.Plural("Archive.Trash.EmptyHeading", plan.Entries.Count),
|
||||
|
||||
Reference in new issue
Block a user