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,8 +1,8 @@
using System.IO.Abstractions;
using System.Text;
using System.Text.RegularExpressions;
using ErsatzTV.Core.Domain;
using ErsatzTV.Core.Graphics;
using ErsatzTV.Core.Interfaces.Metadata;
using ErsatzTV.Core.Interfaces.Repositories;
using ErsatzTV.Core.Interfaces.Streaming;
using ErsatzTV.Core.Metadata;
@@ -18,7 +18,7 @@ namespace ErsatzTV.Infrastructure.Streaming.Graphics;
public partial class GraphicsElementLoader(
TemplateFunctions templateFunctions,
ILocalFileSystem localFileSystem,
IFileSystem fileSystem,
ITemplateDataRepository templateDataRepository,
ILogger<GraphicsElementLoader> logger)
: IGraphicsElementLoader
@@ -147,7 +147,7 @@ public partial class GraphicsElementLoader(
{
try
{
string yaml = await localFileSystem.ReadAllText(fileName);
string yaml = await fileSystem.File.ReadAllTextAsync(fileName, cancellationToken);
var template = Template.Parse(yaml);
var builder = new StringBuilder();
@@ -187,7 +187,7 @@ public partial class GraphicsElementLoader(
foreach (var reference in elementsWithEpg)
{
foreach (string line in await localFileSystem.ReadAllLines(reference.GraphicsElement.Path))
foreach (string line in await fileSystem.File.ReadAllLinesAsync(reference.GraphicsElement.Path))
{
Match match = EpgEntriesRegex().Match(line);
if (!match.Success || !int.TryParse(match.Groups[1].Value, out int value))
@@ -257,7 +257,7 @@ public partial class GraphicsElementLoader(
private async Task<Option<string>> GetTemplatedYaml(string fileName, Dictionary<string, object> variables)
{
string yaml = await localFileSystem.ReadAllText(fileName);
string yaml = await fileSystem.File.ReadAllTextAsync(fileName);
try
{
var scriptObject = new ScriptObject();