include all block playout items in xmltv (#1580)
* include all block playout items in xmltv * double check whether channel preview will work
This commit is contained in:
@@ -96,6 +96,7 @@ public class RefreshChannelDataHandler : IRequestHandler<RefreshChannelData>
|
|||||||
switch (playout.ProgramSchedulePlayoutType)
|
switch (playout.ProgramSchedulePlayoutType)
|
||||||
{
|
{
|
||||||
case ProgramSchedulePlayoutType.Flood:
|
case ProgramSchedulePlayoutType.Flood:
|
||||||
|
case ProgramSchedulePlayoutType.Block:
|
||||||
sorted.AddRange(playouts.Collect(p => p.Items).OrderBy(pi => pi.Start));
|
sorted.AddRange(playouts.Collect(p => p.Items).OrderBy(pi => pi.Start));
|
||||||
break;
|
break;
|
||||||
case ProgramSchedulePlayoutType.ExternalJson:
|
case ProgramSchedulePlayoutType.ExternalJson:
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ public class BlockPlayoutBuilder(
|
|||||||
playout.Channel.Number,
|
playout.Channel.Number,
|
||||||
playout.Channel.Name);
|
playout.Channel.Name);
|
||||||
|
|
||||||
|
var random = new Random();
|
||||||
|
|
||||||
List<PlaybackOrder> allowedPlaybackOrders =
|
List<PlaybackOrder> allowedPlaybackOrders =
|
||||||
[
|
[
|
||||||
PlaybackOrder.Chronological,
|
PlaybackOrder.Chronological,
|
||||||
@@ -154,6 +156,7 @@ public class BlockPlayoutBuilder(
|
|||||||
//PreferredAudioTitle = scheduleItem.PreferredAudioTitle,
|
//PreferredAudioTitle = scheduleItem.PreferredAudioTitle,
|
||||||
//PreferredSubtitleLanguageCode = scheduleItem.PreferredSubtitleLanguageCode,
|
//PreferredSubtitleLanguageCode = scheduleItem.PreferredSubtitleLanguageCode,
|
||||||
//SubtitleMode = scheduleItem.SubtitleMode
|
//SubtitleMode = scheduleItem.SubtitleMode
|
||||||
|
GuideGroup = random.Next(),
|
||||||
BlockKey = JsonConvert.SerializeObject(effectiveBlock.BlockKey),
|
BlockKey = JsonConvert.SerializeObject(effectiveBlock.BlockKey),
|
||||||
CollectionKey = JsonConvert.SerializeObject(collectionKey, JsonSettings),
|
CollectionKey = JsonConvert.SerializeObject(collectionKey, JsonSettings),
|
||||||
CollectionEtag = collectionEtags[collectionKey]
|
CollectionEtag = collectionEtags[collectionKey]
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
}
|
}
|
||||||
else
|
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 Icon="@Icons.Material.Filled.PlayCircle" Disabled="true">
|
||||||
</MudIconButton>
|
</MudIconButton>
|
||||||
</MudTooltip>
|
</MudTooltip>
|
||||||
@@ -151,6 +151,11 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (channel.PlayoutCount < 1)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Option<FFmpegProfileViewModel> maybeProfile = Optional(_ffmpegProfiles.Find(p => p.Id == channel.FFmpegProfileId));
|
Option<FFmpegProfileViewModel> maybeProfile = Optional(_ffmpegProfiles.Find(p => p.Id == channel.FFmpegProfileId));
|
||||||
foreach (FFmpegProfileViewModel profile in maybeProfile)
|
foreach (FFmpegProfileViewModel profile in maybeProfile)
|
||||||
{
|
{
|
||||||
@@ -162,7 +167,7 @@
|
|||||||
|
|
||||||
private async Task PreviewChannel(ChannelViewModel channel)
|
private async Task PreviewChannel(ChannelViewModel channel)
|
||||||
{
|
{
|
||||||
if (channel.StreamingMode is StreamingMode.HttpLiveStreamingDirect or StreamingMode.TransportStream)
|
if (!CanPreviewChannel(channel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user