feat: load legacy Cuts and Res runtime assets

This commit is contained in:
2026-07-18 14:32:04 +09:00
parent da8da06fac
commit 5eb4054120
32 changed files with 2893 additions and 120 deletions

View File

@@ -23,6 +23,7 @@ public static class PlayoutOptionsLoader
{
var options = LoadJson(path ?? DefaultPath);
ApplyEnvironment(options);
ApplyExecutableAssetDefaults(options, AppContext.BaseDirectory);
return options;
}
@@ -42,6 +43,36 @@ public static class PlayoutOptionsLoader
RequiredLiveAuthorizationValue,
StringComparison.Ordinal);
internal static void ApplyExecutableAssetDefaults(
PlayoutOptions options,
string? baseDirectory)
{
ArgumentNullException.ThrowIfNull(options);
if (!string.IsNullOrWhiteSpace(options.SceneDirectory) ||
string.IsNullOrWhiteSpace(baseDirectory))
{
return;
}
try
{
var cutsDirectory = Path.Combine(
Path.GetFullPath(baseDirectory),
"Cuts");
if (Directory.Exists(cutsDirectory))
{
options.SceneDirectory = cutsDirectory;
}
}
catch (Exception exception) when (
exception is ArgumentException or IOException or NotSupportedException or
System.Security.SecurityException)
{
// A missing or invalid executable asset root leaves the existing safe
// configuration unchanged; validation reports it if a command needs it.
}
}
private static PlayoutOptions LoadJson(string path)
{
if (!File.Exists(path))