Phase 5c (owner review 2, R8) is built by six packages in parallel. This commit settles everything they share, so each one touches its own files: - job kinds WorkspaceRender (21), WorkspaceSend (22) and WorkspaceMove (23) with their wire names, default priorities, notices and parameter records; their handlers are registered as skeletons that throw until their package lands - WorkspaceJobOptions and a new CreateHandlers overload; the earlier ones stay and default the options - originals in the media index (an index of phase 5b reads as proxies only), their file names, and the exports/renders.json ledger of local renders, written atomically - the optional project and version of an uploaded render - the workspace settings (size limit, default media, version on render, clean-up age, project to open) and when each project was opened, which Reset and Import keep and Export leaves out - WorkspaceHost split into partial files, with stubs for usage, trash and the folder move, removal hooks for unsent renders and last originals, and a guard that holds work while the workspace moves - every new string of the phase in English and Italian, with tooltips Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
1.2 KiB
C#
26 lines
1.2 KiB
C#
using Chronos.Core.Localization;
|
|
using Chronos.Data.Workspaces;
|
|
|
|
namespace Chronos.App.Workspace;
|
|
|
|
/// <summary>
|
|
/// The workspace's media (phase 5c, P1): what a copy writes (proxies, and the originals besides), copying the originals of a
|
|
/// project, and going back to proxies only.
|
|
/// </summary>
|
|
public sealed partial class WorkspaceHost
|
|
{
|
|
/// <summary>The bytes the first copy of a sequence's media writes into the workspace, and the free bytes of the workspace's drive.</summary>
|
|
/// <exception cref="WorkspaceException">The index or the archive engine is not open.</exception>
|
|
public Task<WorkspaceCopyFacts> CopyFactsAsync(Guid sequenceId, CancellationToken cancellationToken = default)
|
|
{
|
|
var db = _db() ?? throw new WorkspaceException(Loc.L("Editor.Error.NoEngine"));
|
|
var archives = _archives() ?? throw new WorkspaceException(Loc.L("Editor.Error.NoEngine"));
|
|
var root = Root;
|
|
return Task.Run(async () =>
|
|
{
|
|
var (bytes, free) = await WorkspaceJobs.CopyFactsAsync(db, archives, sequenceId, root, cancellationToken).ConfigureAwait(false);
|
|
return new WorkspaceCopyFacts(bytes, free);
|
|
}, cancellationToken);
|
|
}
|
|
}
|