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
+4 -4
View File
@@ -1,8 +1,8 @@
using System.IO.Abstractions;
using System.IO.Enumeration;
using ErsatzTV.Core.Domain;
using ErsatzTV.Core.FFmpeg.Selector;
using ErsatzTV.Core.Interfaces.FFmpeg;
using ErsatzTV.Core.Interfaces.Metadata;
using Microsoft.Extensions.Logging;
using NCalc;
using YamlDotNet.Serialization;
@@ -10,7 +10,7 @@ using YamlDotNet.Serialization.NamingConventions;
namespace ErsatzTV.Core.FFmpeg;
public class CustomStreamSelector(ILocalFileSystem localFileSystem, ILogger<CustomStreamSelector> logger)
public class CustomStreamSelector(IFileSystem fileSystem, ILogger<CustomStreamSelector> logger)
: ICustomStreamSelector
{
public async Task<StreamSelectorResult> SelectStreams(
@@ -25,7 +25,7 @@ public class CustomStreamSelector(ILocalFileSystem localFileSystem, ILogger<Cust
FileSystemLayout.ChannelStreamSelectorsFolder,
channel.StreamSelector);
if (!localFileSystem.FileExists(streamSelectorFile))
if (!fileSystem.File.Exists(streamSelectorFile))
{
logger.LogWarning("YAML stream selector file {File} does not exist; aborting.", channel.StreamSelector);
return StreamSelectorResult.None;
@@ -327,7 +327,7 @@ public class CustomStreamSelector(ILocalFileSystem localFileSystem, ILogger<Cust
{
try
{
string yaml = await localFileSystem.ReadAllText(streamSelectorFile);
string yaml = await fileSystem.File.ReadAllTextAsync(streamSelectorFile);
IDeserializer deserializer = new DeserializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance)