feat: export panel and Render menu, playback options, videos library (owner review 1 phase 5) (#27)
CI / Build and test (push) Successful in 9m41s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 9s
Release / Build, test and publish (push) Successful in 14m49s
CI / PostgreSQL 16 integration (push) Successful in 8m51s
CI / PostgreSQL 17 integration (push) Successful in 9m48s
CI / Docker image (push) Successful in 54s
Release / Server image (push) Successful in 1m39s

Owner review 1 R3, R8, R9. A grouped Export step and Render menu; encoding, playback (reverse, boomerang, loops, fades, hold) and still frames; one videos library on the desktop and the server with a verified trash and copies to a videos folder.

Closes #21

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 #27.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-11-05 09:18:40 +01:00
1 parent 188b2c2e55
commit 728ffa35cb
729 files changed
+26954 -1652

No files matched your search

+80
View File
@@ -164,6 +164,86 @@ public sealed record Render
/// <summary>The project version rendered; null for a render of the sequence's settings.</summary>
public Guid? ProjectVersionId { get; init; }
/// <summary>
/// Lower-case hex SHA-256 of a single-file render (owner review 1, R9), hashed when it is recorded; null for an image
/// sequence's folder (verified file by file when copied) and for a render recorded before migration 0010, hashed the
/// first time it is copied, deleted or restored.
/// </summary>
public string? Sha256 { get; init; }
/// <summary>
/// What the render is beyond its codec (<see cref="RenderKind"/>): null for a video or an image sequence (told apart by
/// <see cref="Codec"/>), <see cref="RenderKind.Still"/> for one frame saved as an image. A text, so a newer Chronos can add
/// kinds.
/// </summary>
public string? Kind { get; init; }
}
/// <summary>The values of <see cref="Render.Kind"/> and of the videos library's kinds (owner review 1, R9).</summary>
public static class RenderKind
{
/// <summary>A video file (MP4, AVI, GIF, APNG): <see cref="Render.Kind"/> null and a video codec.</summary>
public const string Video = "video";
/// <summary>A folder of numbered images: <see cref="Render.Kind"/> null and an image-sequence codec.</summary>
public const string Sequence = "sequence";
/// <summary>One frame saved as one image ("Save frame"): fps 0 and duration 0.</summary>
public const string Still = "still";
/// <summary>
/// The library kind of a render: its <see cref="Render.Kind"/> when set (a kind of a newer Chronos as it is), else
/// <see cref="Sequence"/> for an image-sequence codec and <see cref="Video"/> otherwise.
/// </summary>
public static string Of(string? kind, string? codec) =>
kind is { Length: > 0 } ? kind
: codec is { } c && c.EndsWith("sequence", StringComparison.OrdinalIgnoreCase) ? Sequence
: Video;
/// <summary>
/// <see cref="Of(string?, string?)"/>, telling a still apart when its kind was lost (one uploaded to a server of before
/// phase 5, which does not record it): an image-sequence codec with fps 0 and duration 0, which every still records and
/// no image sequence has.
/// </summary>
public static string Of(string? kind, string? codec, double fps, double durationSeconds)
{
var of = Of(kind, codec);
return of == Sequence && fps <= 0 && durationSeconds <= 0 ? Still : of;
}
/// <inheritdoc cref="Of(string?, string?, double, double)"/>
public static string Of(Render render)
{
ArgumentNullException.ThrowIfNull(render);
return Of(render.Kind, render.Codec, render.Fps, render.DurationSeconds);
}
}
/// <summary>
/// A verified copy of a render in a videos folder (owner review 1, R9; <c>render_copies</c>): recorded once the copy matched
/// its render. There is no link to <c>renders</c>, so the copy of a server render downloaded to a PC is recorded too, and a
/// copy outlives its render's deletion (copies are the user's files; Chronos never deletes them).
/// </summary>
public sealed record RenderCopy
{
public required Guid Id { get; init; }
/// <summary>The render copied (of this index, or of the server it was downloaded from).</summary>
public required Guid RenderId { get; init; }
/// <summary>Absolute path of the copy (a file, or a folder for an image sequence).</summary>
public required string Path { get; init; }
/// <summary>Lower-case hex SHA-256 the copy was verified against; null for an image sequence's folder (verified per file).</summary>
public string? Sha256 { get; init; }
public long Bytes { get; init; }
public DateTimeOffset CopiedAt { get; init; }
/// <summary>The user (server) or the PC (desktop) that copied it.</summary>
public string? CopiedBy { get; init; }
}
/// <summary>