feat: initialize existing development playout PCs

This commit is contained in:
2026-07-26 23:11:29 +09:00
parent 8b628908f0
commit 483b2785a0
18 changed files with 4029 additions and 74 deletions

View File

@@ -1,6 +1,7 @@
using System.Text.RegularExpressions;
using System.Net;
using MBN_STOCK_WEBVIEW.Core.Playout;
using MBN_STOCK_WEBVIEW.Core.Playout.Scenes;
using MBN_STOCK_WEBVIEW.Playout.Interop;
using MBN_STOCK_WEBVIEW.Playout.Runtime;
@@ -125,6 +126,52 @@ internal sealed record ValidatedPlayoutOptions(
throw Invalid(nameof(options.TestSceneAllowlist));
}
if (options.DevelopmentLiveBootstrapApplied)
{
if (options.Mode != PlayoutMode.Live)
{
throw Invalid(nameof(options.Mode));
}
if (!IsLiteralLoopback(host))
{
throw Invalid(nameof(options.Host));
}
string? expectedSceneDirectory;
try
{
expectedSceneDirectory = string.IsNullOrWhiteSpace(
options.DevelopmentLiveExecutableSceneDirectory)
? null
: Path.TrimEndingDirectorySeparator(Path.GetFullPath(
options.DevelopmentLiveExecutableSceneDirectory));
}
catch (Exception exception) when (
exception is ArgumentException or IOException or NotSupportedException or
System.Security.SecurityException)
{
throw Invalid(nameof(options.SceneDirectory));
}
if (expectedSceneDirectory is null ||
!string.Equals(
sceneDirectory,
expectedSceneDirectory,
StringComparison.OrdinalIgnoreCase) ||
options.LegacySceneFadeDuration != 6 ||
options.LegacySceneBackgroundKind != LegacySceneBackgroundKind.None ||
!string.IsNullOrWhiteSpace(options.LegacySceneBackgroundAssetPath) ||
!string.IsNullOrWhiteSpace(options.LegacyBackgroundDirectory) ||
options.ReconnectEnabled ||
options.MaximumReconnectAttempts != 0 ||
options.MaximumAutomaticRefreshesPerTakeIn != 0)
{
throw new PlayoutConfigurationException(
"Development Live configuration no longer matches its protected startup contract.");
}
}
if (options.Mode == PlayoutMode.Test)
{
if (!IsLiteralLoopback(host))