fix(library): hold the Render quick action to the older-server gate
The Library's Render on a remote card posted to the server without the check the editor's Render makes, so a turned project or a proportions-win project was rendered wrong by a server that reads only format 1. It now computes the format the render needs, explains the refusal instead of posting, and sends the project it fetched rather than sizing the job from the card's stale settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eeaddc2d14
commit
e188cf7de6
2 files changed
+49
-4
No files matched your search
@@ -0,0 +1,30 @@
|
||||
using Chronos.App.Library;
|
||||
using Chronos.Core.Localization;
|
||||
using Chronos.Core.Project;
|
||||
using Chronos.Testing;
|
||||
|
||||
namespace Chronos.App.Tests.Library;
|
||||
|
||||
/// <summary>
|
||||
/// The Library's Render on a remote card is held to the editor's rule (owner review 1, phase 4): settings or proportions a
|
||||
/// server of an older settings format would render otherwise are not posted to it.
|
||||
/// </summary>
|
||||
public sealed class LibraryRenderGateTests
|
||||
{
|
||||
private static ExportSettings Uhd() => new() { Preset = new Auto<string>().WithManual("4k-h264") };
|
||||
|
||||
[Test]
|
||||
public void AnOlderServerIsNotSentARenderItWouldGetWrong()
|
||||
{
|
||||
var plain = new ProjectSettings { Export = Uhd() };
|
||||
var turned = plain with { Camera = new CameraSettings { Rotate = 90 } };
|
||||
var portrait = plain with { Camera = new CameraSettings { Aspect = new Auto<string>().WithManual("9:16") } };
|
||||
var newer = Loc.L("Tooltips.Server.NeedsNewerServer");
|
||||
|
||||
Assert.Null(LibraryActions.ServerCannotRender(plain, plain.Export, 6000, 4000, ProjectSettings.BaseVersion));
|
||||
Assert.Equal(newer, LibraryActions.ServerCannotRender(turned, turned.Export, 6000, 4000, ProjectSettings.BaseVersion));
|
||||
Assert.Equal(newer, LibraryActions.ServerCannotRender(portrait, portrait.Export, 6000, 4000, ProjectSettings.BaseVersion), "the proportions win only on a newer server");
|
||||
Assert.Null(LibraryActions.ServerCannotRender(turned, turned.Export, 6000, 4000, ProjectSettings.CurrentVersion));
|
||||
Assert.Null(LibraryActions.ServerCannotRender(portrait, portrait.Export, 6000, 4000, ProjectSettings.CurrentVersion));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user