work around sequential schedule validation limit (#2655)

* remove readalltext

* remove unused method

* remove fileexists

* remove folderexists

* remove readalllines

* remove fake local file system

* show playlist name in playout build errors

* add basic sequential schedule validator tests

* work around sequential schedule validation limit
This commit is contained in:
Jason Dove
2025-11-24 12:08:43 -06:00
committed by GitHub
parent e40d192aea
commit ec0d8ea6ac
82 changed files with 841 additions and 750 deletions
@@ -1,4 +1,5 @@
using System.Collections.Concurrent;
using System.IO.Abstractions;
using System.Runtime.InteropServices;
using CliWrap;
using ErsatzTV.Core;
@@ -15,6 +16,7 @@ using YamlDotNet.Serialization.NamingConventions;
namespace ErsatzTV.Infrastructure.FFmpeg;
public class MpegTsScriptService(
IFileSystem fileSystem,
ILocalFileSystem localFileSystem,
ITempFilePool tempFilePool,
ILogger<MpegTsScriptService> logger) : IMpegTsScriptService
@@ -26,9 +28,9 @@ public class MpegTsScriptService(
foreach (string folder in localFileSystem.ListSubdirectories(FileSystemLayout.MpegTsScriptsFolder))
{
string definition = Path.Combine(folder, "mpegts.yml");
if (!Scripts.ContainsKey(folder) && localFileSystem.FileExists(definition))
if (!Scripts.ContainsKey(folder) && fileSystem.File.Exists(definition))
{
Option<MpegTsScript> maybeScript = FromYaml(await localFileSystem.ReadAllText(definition));
Option<MpegTsScript> maybeScript = FromYaml(await fileSystem.File.ReadAllTextAsync(definition));
foreach (var script in maybeScript)
{
script.Id = Path.GetFileName(folder);
@@ -94,7 +96,7 @@ public class MpegTsScriptService(
string channelName,
string ffmpegPath)
{
string script = await localFileSystem.ReadAllText(fileName);
string script = await fileSystem.File.ReadAllTextAsync(fileName);
try
{
var data = new Dictionary<string, string>