feat: owner review 2 phase 4a: Reorganize sequences after import (#12)
CI / Build and test (push) Successful in 9m15s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 15m35s
CI / PostgreSQL 16 integration (push) Successful in 7m26s
CI / PostgreSQL 17 integration (push) Successful in 6m47s
CI / Docker image (push) Successful in 59s
Release / Server image (push) Successful in 1m24s
CI / Build and test (push) Successful in 9m15s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 15m35s
CI / PostgreSQL 16 integration (push) Successful in 7m26s
CI / PostgreSQL 17 integration (push) Successful in 6m47s
CI / Docker image (push) Successful in 59s
Release / Server image (push) Successful in 1m24s
- Reorganize… on the web panel and the desktop: folder, file and title templates applied to existing sequences, with a dry run and an explicit Apply that runs as a job. - One naming rule (FrameNaming) for import, upload and Reorganize. - Crash-safe plan and file journals, held plans, stale-plan refusal; exports move with their folder. - Writers refuse a folder another program moved or gave to another sequence. - Server: POST /api/v1/archive/reorganize with a bounded plan cache; template rules. - Phase 3 docs and translations merged; strings in all 38 languages. 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 #12.
This commit is contained in:
1 parent
9aa818ed47
commit
7e4a3b481d
416 files changed
+15304
-1572
No files matched your search
@@ -56,7 +56,12 @@ public sealed record JobPriorityRequest(string Priority);
|
||||
/// </summary>
|
||||
public sealed record RenderJobParameters(string PresetName, string PresetJson, string Codec, int Width, int Height, bool UseProxies, string? SettingsJson);
|
||||
|
||||
/// <summary><c>POST /api/v1/nodes/{id}/jobs/{jobId}/result</c>: the finished output a node is about to upload in chunks.</summary>
|
||||
/// <summary>
|
||||
/// <c>POST /api/v1/nodes/{id}/jobs/{jobId}/result</c>: the finished output a node is about to upload in chunks. A
|
||||
/// <c>result/complete</c> that cannot file it for now answers 503 <c>sequence_busy</c>, <c>archive_offline</c> or
|
||||
/// <c>folder_moved</c> (another index moved the sequence's folder; the server's next scan finds it); the upload and the
|
||||
/// job stay the node's, to be completed again.
|
||||
/// </summary>
|
||||
public sealed record RenderResultRequest(
|
||||
string FileName,
|
||||
long Size,
|
||||
|
||||
@@ -81,3 +81,45 @@ public sealed record FacetDto(string Value, int Sequences, string? Label = null)
|
||||
/// sequences first) and tags in use (by name) of the archive's sequences, for the admin panel's Library filters.
|
||||
/// </summary>
|
||||
public sealed record LibraryFacetsDto(IReadOnlyList<FacetDto> Years, IReadOnlyList<FacetDto> Cameras, IReadOnlyList<FacetDto> Tags);
|
||||
|
||||
/// <summary>
|
||||
/// <c>POST /api/v1/archive/reorganize</c> (owner review 2, R7; administrators of the archive): new folder, file and title
|
||||
/// templates applied to sequences already in the archive, <see cref="SequenceIds"/> or every one with <see cref="All"/>
|
||||
/// (exactly one of the two). A null template keeps that part; at least one is given, each valid as the archive settings'
|
||||
/// templates are. <see cref="DryRun"/> answers the plan (<see cref="ReorganizePlanDto"/>) and changes nothing; the server
|
||||
/// keeps it a few minutes, a refusal too, so the same dry run again (also after one cut off) is answered from it; 503
|
||||
/// <c>plan_dropped</c> when the server stopped making it (it took too long, or too many were asked at once). The change
|
||||
/// itself sends that plan's <see cref="Fingerprint"/> back and runs as a <c>move</c> job (202): 409 <c>plan_changed</c>
|
||||
/// when the index changed since in what the plan reads (the sequences' rows, and which of their photos are hashed, as a
|
||||
/// verify does); a change made on disk alone, which the index does not have yet, is found by the job, which then fails and
|
||||
/// changes nothing.
|
||||
/// </summary>
|
||||
public sealed record ReorganizeRequest(IReadOnlyList<Guid>? SequenceIds, bool All, string? FolderTemplate, string? FileTemplate, string? TitleTemplate,
|
||||
bool DryRun, string? Fingerprint = null);
|
||||
|
||||
/// <summary>A file a Reorganize renames: its name before and after, relative to the sequence folder (<c>originals/…</c>).</summary>
|
||||
public sealed record ReorganizeFileDto(string From, string To);
|
||||
|
||||
/// <summary>
|
||||
/// Why part of a sequence stays as it is in a Reorganize, as one localised sentence: photos that keep their names,
|
||||
/// <see cref="Reason"/> <c>in_place</c> (kept in place outside <c>originals/</c>), <c>unhashed</c> (never verified) or
|
||||
/// <c>missing</c>, with how many; or <c>unreadable</c> (0 photos): the sequence's sidecar cannot be read, so the sequence
|
||||
/// keeps its folder, title and names, and so does every folder it is inside.
|
||||
/// </summary>
|
||||
public sealed record ReorganizeBlockedDto(string Reason, int Photos, string Message);
|
||||
|
||||
/// <summary>
|
||||
/// One sequence of a Reorganize plan, in the order the steps apply: its folder and title before and after,
|
||||
/// <see cref="Carried"/> when it only moves with a folder it is inside, the frames version its file names were planned at
|
||||
/// (0 when none changes), how many photos get a new name with the first of them (<see cref="FileSamples"/>), and what stays
|
||||
/// as it is (<see cref="Blocked"/>). A step that changes nothing lists only that.
|
||||
/// </summary>
|
||||
public sealed record ReorganizeStepDto(Guid SequenceId, string FromFolder, string ToFolder, string? FromTitle, string? ToTitle, bool Carried,
|
||||
int FramesVersion, int FileChanges, IReadOnlyList<ReorganizeFileDto> FileSamples, IReadOnlyList<ReorganizeBlockedDto> Blocked);
|
||||
|
||||
/// <summary>
|
||||
/// The dry run of a Reorganize: its steps (those that change nothing list only what stays as it is), the sequences that
|
||||
/// change (carried ones included), the photos renamed, the photos that keep their names (a sequence that stays as it is
|
||||
/// whole, <c>unreadable</c>, counts none), and the fingerprint the change sends back.
|
||||
/// </summary>
|
||||
public sealed record ReorganizePlanDto(IReadOnlyList<ReorganizeStepDto> Steps, int Sequences, int Files, int Kept, string Fingerprint);
|
||||
@@ -87,4 +87,6 @@ namespace Chronos.Protocol;
|
||||
[JsonSerializable(typeof(BulkItemResult))]
|
||||
[JsonSerializable(typeof(BulkResultDto))]
|
||||
[JsonSerializable(typeof(LibraryFacetsDto))]
|
||||
[JsonSerializable(typeof(ReorganizeRequest))]
|
||||
[JsonSerializable(typeof(ReorganizePlanDto))]
|
||||
public sealed partial class ProtocolJson : JsonSerializerContext;
|
||||
@@ -43,7 +43,9 @@ public sealed record CardImportReport(Guid ImportId, string Card, string State,
|
||||
/// renders are uploaded on request). The render keeps its id on the server, so both sides recognise it; when the
|
||||
/// server already has that id it answers 200 with <see cref="StartUploadResponse.AlreadyExists"/>. Chunks go to
|
||||
/// <c>/uploads/{uploadId}/chunks/{n}</c>; <c>POST /sequences/{id}/renders/{uploadId}/complete</c> verifies the SHA-256
|
||||
/// and files the render under the sequence's exports.
|
||||
/// and files the render under the sequence's exports. A completion that cannot file it for now answers 503
|
||||
/// <c>sequence_busy</c>, <c>archive_offline</c> or <c>folder_moved</c> (another index moved the sequence's folder; the
|
||||
/// server's next scan finds it) and keeps the upload, to be completed again.
|
||||
/// </summary>
|
||||
public sealed record RenderUploadRequest(
|
||||
Guid RenderId,
|
||||
|
||||
Reference in new issue
Block a user