Browse Source

fix on-demand playouts having empty xmltv (#2589)

pull/2590/head
Jason Dove 7 months ago committed by GitHub
parent
commit
63f342e6a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 12
      ErsatzTV/Services/SchedulerService.cs

1
CHANGELOG.md

@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add `MediaItem_Resolution` template data (the current `Resolution` variable is the FFmpeg Profile resolution)
- Add `MediaItem_Start` template data (DateTimeOffset)
- Add `MediaItem_Stop` template data (DateTimeOffset)
- Time shift on-demand playouts every hour to prevent XMLTV from appearing empty
### Fixed
- Fix HLS Direct playback with Jellyfin 10.11

12
ErsatzTV/Services/SchedulerService.cs

@ -213,12 +213,18 @@ public class SchedulerService : BackgroundService @@ -213,12 +213,18 @@ public class SchedulerService : BackgroundService
.Include(p => p.Channel)
.ToListAsync(cancellationToken);
foreach (int playoutId in playouts.OrderBy(p => decimal.Parse(p.Channel.Number, CultureInfo.InvariantCulture))
.Map(p => p.Id))
foreach (Playout playout in playouts.OrderBy(p => decimal.Parse(p.Channel.Number, CultureInfo.InvariantCulture)))
{
await _workerChannel.WriteAsync(
new BuildPlayout(playoutId, PlayoutBuildMode.Continue),
new BuildPlayout(playout.Id, PlayoutBuildMode.Continue),
cancellationToken);
if (playout.Channel.PlayoutMode is ChannelPlayoutMode.OnDemand)
{
await _workerChannel.WriteAsync(
new TimeShiftOnDemandPlayout(playout.Id, DateTimeOffset.Now, false),
cancellationToken);
}
}
}

Loading…
Cancel
Save