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

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:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-11-03 10:41:50 +01:00
1 parent 7e4a3b481d
commit efa87f68ce
354 files changed
+24530 -843

No files matched your search

+13 -3
View File
@@ -18,6 +18,7 @@ public sealed class LibraryPager(Func<SequenceQuery, CancellationToken, Task<Pag
private CancellationTokenSource _cancellation = new();
private Task<Page<Sequence>>? _pending;
private Task<LibraryPage?>? _current;
private string? _cursor;
public int PageSize { get; } = Math.Clamp(pageSize, 1, 1000);
@@ -47,16 +48,25 @@ public sealed class LibraryPager(Func<SequenceQuery, CancellationToken, Task<Pag
_cursor = null;
Loaded = 0;
HasMore = true;
return LoadAsync(first: true);
return _current = LoadAsync(first: true);
}
/// <summary>The next page; null when everything is loaded, a page is already loading, or the filter changed meanwhile.</summary>
/// <summary>
/// The next page; null when everything is loaded, a page is already loading (at once: <see cref="WhenLoadedAsync"/>
/// waits for that page), or the filter changed meanwhile.
/// </summary>
public Task<LibraryPage?> LoadMoreAsync()
{
if (_pending is not null || !HasMore || Generation == 0) return Task.FromResult<LibraryPage?>(null);
return LoadAsync(first: false);
return _current = LoadAsync(first: false);
}
/// <summary>
/// Completes once the page in flight, if any, has been delivered or dropped; at once when none is. It never fails: the
/// caller that asked for the page gets its failure.
/// </summary>
public Task WhenLoadedAsync() => _current is { IsCompleted: false } current ? Task.WhenAny(current) : Task.CompletedTask;
/// <summary>Stops the page in flight (screen closed).</summary>
public void Cancel()
{
+6 -2
View File
@@ -16,6 +16,9 @@ public enum MassAction
/// <summary>Folders, file names and titles from templates (owner review 2, R7), for the sequences of one archive.</summary>
Reorganize,
/// <summary>JPEG, 16-bit TIFF or linear DNG after import (owner review 2, R7), for the sequences of one archive.</summary>
Convert,
Upload,
Download,
Delete,
@@ -73,8 +76,9 @@ public static class MassActions
return null;
}
if (targets.Count == 0) return Loc.L("Library.Blocked.ServerOnly");
// One plan, one job: a Reorganize renames inside one archive, never across two.
return action == MassAction.Reorganize && targets.Select(t => t.Sequence.ArchiveId).Distinct().Count() > 1 ? Loc.L("Library.Blocked.OneArchive") : null;
// One plan, one job: a Reorganize renames and a conversion writes inside one archive, never across two.
if (action is not (MassAction.Reorganize or MassAction.Convert) || targets.Select(t => t.Sequence.ArchiveId).Distinct().Count() <= 1) return null;
return Loc.L(action == MassAction.Reorganize ? "Library.Blocked.OneArchive" : "Library.Blocked.OneArchiveConvert");
}
/// <summary>The enabled tooltip: what the action does to how many sequences.</summary>