feat(export): output path from a project's export folder and name template

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-02 11:19:47 +00:00
1 parent 2a9f93e414
commit 15fe092614
2 files changed
+23

No files matched your search

@@ -1,4 +1,5 @@
using Titano.Core.Export;
using Titano.Core.Project;
using Titano.Core.Video;
using Titano.Testing;
@@ -68,4 +69,15 @@ public sealed class ExportNamingTests
Assert.Equal(Path.Combine(dir, "Harbour sunset (2)"), ExportNaming.OutputPath(dir, "{title}", Context(VideoCodec.PngSequence)));
Assert.Equal(Path.Combine(dir, "Harbour sunset.gif"), ExportNaming.OutputPath(dir, "{title}", Context(VideoCodec.Gif)));
}
[Test]
public void ProjectSettingsChooseFolderAndTemplate()
{
var exports = _context.CreateTempDirectory("exports");
var custom = _context.CreateTempDirectory("custom");
var byDefault = ExportNaming.OutputPath(new ExportSettings(), exports, Context());
Assert.Equal(Path.Combine(exports, "2024-06-21 Harbour sunset - 4K UHD HEVC.mp4"), byDefault);
var chosen = ExportNaming.OutputPath(new ExportSettings { Folder = custom, NameTemplate = "{title} {width}" }, exports, Context());
Assert.Equal(Path.Combine(custom, "Harbour sunset 3840.mp4"), chosen);
}
}