From 7bd0de99e1fc74e12a6cfe8749db1e0272e0d630 Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Sat, 2 Aug 2025 03:42:42 +0000 Subject: [PATCH] fix gaps in yaml playouts (#2235) * dont run multiple dotnet builds in background * fix gaps in yaml playouts --- .github/workflows/artifacts.yml | 7 +++---- .../YamlScheduling/Handlers/YamlPlayoutAllHandler.cs | 1 - .../YamlScheduling/Handlers/YamlPlayoutContentHandler.cs | 2 ++ .../YamlScheduling/Handlers/YamlPlayoutCountHandler.cs | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index eb07f304..53655069 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -73,9 +73,8 @@ jobs: shell: bash run: | sed -i '' '/Scanner/d' ErsatzTV/ErsatzTV.csproj - dotnet publish ErsatzTV.Scanner/ErsatzTV.Scanner.csproj --framework net9.0 --runtime "${{ matrix.target }}" -c Release -o publish -p:RestoreEnablePackagePruning=true -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=false -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true & - dotnet publish ErsatzTV/ErsatzTV.csproj --framework net9.0 --runtime "${{ matrix.target }}" -c Release -o publish -p:RestoreEnablePackagePruning=true -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=false -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true & - wait + dotnet publish ErsatzTV.Scanner/ErsatzTV.Scanner.csproj --framework net9.0 --runtime "${{ matrix.target }}" -c Release -o publish -p:RestoreEnablePackagePruning=true -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=false -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true + dotnet publish ErsatzTV/ErsatzTV.csproj --framework net9.0 --runtime "${{ matrix.target }}" -c Release -o publish -p:RestoreEnablePackagePruning=true -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=false -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true - name: Bundle shell: bash @@ -195,7 +194,7 @@ jobs: # Build everything sed -i '/Scanner/d' ErsatzTV/ErsatzTV.csproj - dotnet publish ErsatzTV.Scanner/ErsatzTV.Scanner.csproj --framework net9.0 --runtime "${{ matrix.target }}" -c Release -o "scanner" -p:RestoreEnablePackagePruning=true -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true & + dotnet publish ErsatzTV.Scanner/ErsatzTV.Scanner.csproj --framework net9.0 --runtime "${{ matrix.target }}" -c Release -o "scanner" -p:RestoreEnablePackagePruning=true -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true dotnet publish ErsatzTV/ErsatzTV.csproj --framework net9.0 --runtime "${{ matrix.target }}" -c Release -o "main" -p:RestoreEnablePackagePruning=true -p:InformationalVersion="${{ inputs.release_version }}-${{ matrix.target }}" -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded -p:PublishSingleFile=true --self-contained true & # Build Windows launcher diff --git a/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutAllHandler.cs b/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutAllHandler.cs index 523ec105..54a8d556 100644 --- a/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutAllHandler.cs +++ b/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutAllHandler.cs @@ -89,7 +89,6 @@ public class YamlPlayoutAllHandler(EnumeratorCache enumeratorCache) : YamlPlayou context.Playout.PlayoutHistory.Add(history); } - context.CurrentTime += itemDuration; enumerator.MoveNext(); } diff --git a/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutContentHandler.cs b/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutContentHandler.cs index 6886ce93..17903234 100644 --- a/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutContentHandler.cs +++ b/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutContentHandler.cs @@ -178,6 +178,7 @@ public abstract class YamlPlayoutContentHandler(EnumeratorCache enumeratorCache) if (itemChapters.Count < 2 || maybeMidRollSequence.IsNone) { context.Playout.Items.Add(playoutItem); + context.CurrentTime += playoutItem.OutPoint - playoutItem.InPoint; } else { @@ -191,6 +192,7 @@ public abstract class YamlPlayoutContentHandler(EnumeratorCache enumeratorCache) if (filteredChapters.Count < 2) { context.Playout.Items.Add(playoutItem); + context.CurrentTime += playoutItem.OutPoint - playoutItem.InPoint; } else { diff --git a/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutCountHandler.cs b/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutCountHandler.cs index 4c2f7b89..39813480 100644 --- a/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutCountHandler.cs +++ b/ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutCountHandler.cs @@ -114,7 +114,6 @@ public class YamlPlayoutCountHandler(EnumeratorCache enumeratorCache) : YamlPlay context.Playout.PlayoutHistory.Add(history); } - context.CurrentTime += itemDuration; enumerator.MoveNext(); }