Browse Source

include all block playout items in xmltv (#1580)

* include all block playout items in xmltv

* double check whether channel preview will work
pull/1581/head
Jason Dove 1 year ago committed by GitHub
parent
commit
46c26b5ea7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      ErsatzTV.Application/Channels/Commands/RefreshChannelDataHandler.cs
  2. 3
      ErsatzTV.Core/Scheduling/BlockScheduling/BlockPlayoutBuilder.cs
  3. 9
      ErsatzTV/Pages/Channels.razor

1
ErsatzTV.Application/Channels/Commands/RefreshChannelDataHandler.cs

@ -96,6 +96,7 @@ public class RefreshChannelDataHandler : IRequestHandler<RefreshChannelData> @@ -96,6 +96,7 @@ public class RefreshChannelDataHandler : IRequestHandler<RefreshChannelData>
switch (playout.ProgramSchedulePlayoutType)
{
case ProgramSchedulePlayoutType.Flood:
case ProgramSchedulePlayoutType.Block:
sorted.AddRange(playouts.Collect(p => p.Items).OrderBy(pi => pi.Start));
break;
case ProgramSchedulePlayoutType.ExternalJson:

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

@ -32,6 +32,8 @@ public class BlockPlayoutBuilder( @@ -32,6 +32,8 @@ public class BlockPlayoutBuilder(
playout.Channel.Number,
playout.Channel.Name);
var random = new Random();
List<PlaybackOrder> allowedPlaybackOrders =
[
PlaybackOrder.Chronological,
@ -154,6 +156,7 @@ public class BlockPlayoutBuilder( @@ -154,6 +156,7 @@ public class BlockPlayoutBuilder(
//PreferredAudioTitle = scheduleItem.PreferredAudioTitle,
//PreferredSubtitleLanguageCode = scheduleItem.PreferredSubtitleLanguageCode,
//SubtitleMode = scheduleItem.SubtitleMode
GuideGroup = random.Next(),
BlockKey = JsonConvert.SerializeObject(effectiveBlock.BlockKey),
CollectionKey = JsonConvert.SerializeObject(collectionKey, JsonSettings),
CollectionEtag = collectionEtags[collectionKey]

9
ErsatzTV/Pages/Channels.razor

@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
}
else
{
<MudTooltip Text="Channel preview requires MPEG-TS/HLS Segmenter and H264/AAC">
<MudTooltip Text="Channel preview requires playout, MPEG-TS/HLS Segmenter, and H264/AAC">
<MudIconButton Icon="@Icons.Material.Filled.PlayCircle" Disabled="true">
</MudIconButton>
</MudTooltip>
@ -151,6 +151,11 @@ @@ -151,6 +151,11 @@
return false;
}
if (channel.PlayoutCount < 1)
{
return false;
}
Option<FFmpegProfileViewModel> maybeProfile = Optional(_ffmpegProfiles.Find(p => p.Id == channel.FFmpegProfileId));
foreach (FFmpegProfileViewModel profile in maybeProfile)
{
@ -162,7 +167,7 @@ @@ -162,7 +167,7 @@
private async Task PreviewChannel(ChannelViewModel channel)
{
if (channel.StreamingMode is StreamingMode.HttpLiveStreamingDirect or StreamingMode.TransportStream)
if (!CanPreviewChannel(channel))
{
return;
}

Loading…
Cancel
Save