Browse Source

fix block history when using mirror offset

pull/2579/head
Jason Dove 9 months ago
parent
commit
e66b26347b
No known key found for this signature in database
  1. 2
      CHANGELOG.md
  2. 4
      ErsatzTV.Application/Playouts/Commands/BuildPlayoutHandler.cs
  3. 2
      ErsatzTV.Core/Scheduling/BlockScheduling/BlockPlayoutBuilder.cs

2
CHANGELOG.md

@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Fix HLS Direct playback with Jellyfin 10.11
- Fix remote stream scripts (parsing issue with spaces and quotes)
- Fix block history being removed when it is still needed for mirror channel
- This caused playout build errors like "Unable to locate history for playout item"
## [25.8.0] - 2025-10-26
### Added

4
ErsatzTV.Application/Playouts/Commands/BuildPlayoutHandler.cs

@ -367,8 +367,8 @@ public class BuildPlayoutHandler : IRequestHandler<BuildPlayout, Either<BaseErro @@ -367,8 +367,8 @@ public class BuildPlayoutHandler : IRequestHandler<BuildPlayout, Either<BaseErro
{
try
{
await dbContext.PlayoutBuildStatus.AddAsync(newBuildStatus, cancellationToken);
await dbContext.SaveChangesAsync(cancellationToken);
await dbContext.PlayoutBuildStatus.AddAsync(newBuildStatus, CancellationToken.None);
await dbContext.SaveChangesAsync(CancellationToken.None);
}
catch (Exception)
{

2
ErsatzTV.Core/Scheduling/BlockScheduling/BlockPlayoutBuilder.cs

@ -397,7 +397,7 @@ public class BlockPlayoutBuilder( @@ -397,7 +397,7 @@ public class BlockPlayoutBuilder(
IEnumerable<PlayoutHistory> allItemsToDelete = referenceData.PlayoutHistory
.GroupBy(h => h.Key)
.SelectMany(group => group
.Filter(h => h.Finish < start.UtcDateTime)
.Filter(h => h.Finish < start.UtcDateTime - referenceData.MaxPlayoutOffset)
.OrderByDescending(h => h.Finish)
.Tail());

Loading…
Cancel
Save