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)
|
||||
{
|
||||
case ProgramSchedulePlayoutType.Flood:
|
||||
case ProgramSchedulePlayoutType.Block:
|
||||
sorted.AddRange(playouts.Collect(p => p.Items).OrderBy(pi => pi.Start));
|
||||
break;
|
||||
case ProgramSchedulePlayoutType.ExternalJson:
|
||||
|
||||
@@ -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(
|
||||
//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]
|
||||
|
||||
@@ -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 @@
|
||||
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 @@
|
||||
|
||||
private async Task PreviewChannel(ChannelViewModel channel)
|
||||
{
|
||||
if (channel.StreamingMode is StreamingMode.HttpLiveStreamingDirect or StreamingMode.TransportStream)
|
||||
if (!CanPreviewChannel(channel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user