feat(workspace): copy originals into the workspace and choose the project Edit opens
Phase 5c P1. A workspace copy of kind "originals" now copies each frame's original beside its proxy, so a later local render has full-quality input: streamed into a .part file, hashed as written, checked against the home's SHA-256, renamed and read back. Archive and server homes both work, a stopped copy resumes (originals: checkpoint), and the space check counts the originals. A frame whose original is gone, damaged or refused keeps its proxy and the job says how many; the copy does not fail. Stale originals are deleted only when the home holds the same SHA-256, otherwise moved to the workspace's trash. Proxies only... plans first (every original hashed against the home's frames), asks for an explicit confirmation, rewrites the media to proxies before it touches a file, refuses a plan that changed since, and trashes what the home no longer holds instead of deleting it. Edit: Open in workspace offers Originals (the settings' default, disabled when the drive lacks room) with the originals' size for archive and server homes; Settings > Workspace > Open project picks Last used, Main or asks which; each open is recorded for the clean-up. The project menu gains Copy originals... and Proxies only..., refused while changes are unsaved or jobs of the sequence run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2e1c67f531
commit
0c51d11080
14 files changed
+1397
-70
No files matched your search
@@ -192,14 +192,17 @@ public abstract class WorkspaceTests(TestContext context) : DatabaseTest(context
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task CopyingTheOriginalsIsRefusedForNowWithItsReason()
|
||||
public async Task CopyingTheOriginalsCopiesTheProxiesToo()
|
||||
{
|
||||
var fx = await FixtureAsync(2);
|
||||
var (store, sync) = fx.Workspace();
|
||||
var main = await fx.Archive.Service.Projects.MainAsync(fx.Sequence.Id, fx.Ct);
|
||||
await sync.CheckoutAsync(fx.Home, main.Id, BundleMedia.Originals, fx.Ct);
|
||||
var job = await fx.CopyAsync(store, main.Id, JobState.Failed, media: BundleMedia.Originals);
|
||||
Assert.Equal(Loc.L("Errors.Workspace.OriginalsLater"), job.Error);
|
||||
var project = await sync.CheckoutAsync(fx.Home, main.Id, BundleMedia.Originals, fx.Ct);
|
||||
await fx.CopyAsync(store, main.Id, media: BundleMedia.Originals);
|
||||
var media = project.ReadMedia()!;
|
||||
Assert.True(media.HoldsOriginals);
|
||||
Assert.True(media.Frames.All(f => f.HasOriginal), "every frame has its original");
|
||||
Assert.Equal(media.Frames.Count, (await sync.OpenAsync(main.Id, fx.Ct)).Media!.Frames.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in new issue
Block a user