refactor(server): render jobs posted to the server take the client's label format
The server wrote "title → preset" by hand; it now uses ProcessingJobs.RenderLabel, the Jobs.Target.Render resource the desktop uses, whose right-to-left variant points the arrow the reading way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
2 files changed
+10
-6
No files matched your search
@@ -37,13 +37,17 @@ public static class ProcessingJobs
|
||||
ArgumentNullException.ThrowIfNull(sequence);
|
||||
ArgumentNullException.ThrowIfNull(export);
|
||||
var parameters = Parameters(export, sourceWidth, sourceHeight, project?.ToJson(), useProxies);
|
||||
// The label is stored as written, in the language of the moment like the preset name: its arrow points from the
|
||||
// sequence to the preset in that language's reading direction.
|
||||
var label = Loc.L(Loc.IsRightToLeft ? "Jobs.Target.RenderRtl" : "Jobs.Target.Render", sequence.DisplayTitle, parameters.PresetName);
|
||||
return new ArchiveJobRequest(JobKind.Render, [sequence.Id], label,
|
||||
return new ArchiveJobRequest(JobKind.Render, [sequence.Id], RenderLabel(sequence.DisplayTitle, parameters.PresetName),
|
||||
JsonSerializer.Serialize(parameters, ProtocolJson.Default.RenderJobParameters), JobPriority.User);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The label of a render job, "Harbour sunset → 4K HEVC". It is stored as written, in the language of the moment like
|
||||
/// the preset name: its arrow points from the sequence to the preset in that language's reading direction.
|
||||
/// </summary>
|
||||
public static string RenderLabel(string title, string presetName) =>
|
||||
Loc.L(Loc.IsRightToLeft ? "Jobs.Target.RenderRtl" : "Jobs.Target.Render", title, presetName);
|
||||
|
||||
/// <summary>
|
||||
/// A posted render job as one job per preset, as <see cref="RenderEach"/> makes them (a render node uploads one file
|
||||
/// per job): the job itself when it has no batch; otherwise its own preset, then each batch preset with its own values,
|
||||
|
||||
Reference in new issue
Block a user