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

+11
View File
@@ -1,6 +1,7 @@
using System.Globalization;
using System.Text;
using Titano.Core.Naming;
using Titano.Core.Project;
using Titano.Core.Video;
namespace Titano.Core.Export;
@@ -114,6 +115,16 @@ public static class ExportNaming
return Unique(folder, name, extension);
}
/// <summary>
/// Output path of a project's export: <see cref="ExportSettings.Folder"/> or, when unset, the sequence's exports folder,
/// named by <see cref="ExportSettings.NameTemplate"/>.
/// </summary>
public static string OutputPath(ExportSettings settings, string sequenceExportsFolder, ExportNameContext context)
{
ArgumentNullException.ThrowIfNull(settings);
return OutputPath(string.IsNullOrWhiteSpace(settings.Folder) ? sequenceExportsFolder : settings.Folder, settings.NameTemplate, context);
}
/// <summary>"name.ext", or "name (2).ext", "name (3).ext"… when a file or folder of that name exists.</summary>
public static string Unique(string folder, string name, string extension)
{