fix shuffle in order and fill with group mode incompatibility (#2044)
This commit is contained in:
@@ -56,6 +56,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Fix multi-variant playlist to report more accurate `BANDWIDTH` value based on ffmpeg profile
|
||||
- Fix detecting NVIDIA capabilities on Blackwell GPUs
|
||||
- Fix decoder selection in NVIDIA pipeline
|
||||
- Prevent playback order `Shuffle In Order` from being used with `Fill With Group Mode` as they are incompatible
|
||||
|
||||
## [25.1.0] - 2025-01-10
|
||||
### Added
|
||||
|
||||
@@ -99,6 +99,12 @@ public class ReplaceProgramScheduleItemsHandler : ProgramScheduleItemCommandBase
|
||||
var keyOrders = new Dictionary<CollectionKey, System.Collections.Generic.HashSet<PlaybackOrder>>();
|
||||
foreach (ReplaceProgramScheduleItem item in request.Items)
|
||||
{
|
||||
if (item.PlaybackOrder is PlaybackOrder.ShuffleInOrder &&
|
||||
item.FillWithGroupMode is not FillWithGroupMode.None)
|
||||
{
|
||||
return new BaseError("Shuffle in Order cannot be used with Fill With Group Mode");
|
||||
}
|
||||
|
||||
var key = new CollectionKey(
|
||||
item.CollectionType,
|
||||
item.CollectionId,
|
||||
|
||||
@@ -72,6 +72,11 @@ public class GetProgramScheduleItemsHandler :
|
||||
item = item with { PlayoutMode = PlayoutMode.One };
|
||||
}
|
||||
}
|
||||
|
||||
if (item.PlaybackOrder is PlaybackOrder.ShuffleInOrder)
|
||||
{
|
||||
item = item with { FillWithGroupMode = FillWithGroupMode.None };
|
||||
}
|
||||
}
|
||||
|
||||
return item;
|
||||
|
||||
@@ -282,8 +282,15 @@
|
||||
</MudGrid>
|
||||
<MudSelect Class="mt-3" Label="Fill With Group Mode (Show or Artist)" @bind-Value="@_selectedItem.FillWithGroupMode" For="@(() => _selectedItem.FillWithGroupMode)" Disabled="@(_selectedItem.CanFillWithGroups == false)">
|
||||
<MudSelectItem Value="FillWithGroupMode.None">(none)</MudSelectItem>
|
||||
<MudSelectItem Value="FillWithGroupMode.FillWithOrderedGroups">Ordered Groups</MudSelectItem>
|
||||
<MudSelectItem Value="FillWithGroupMode.FillWithShuffledGroups">Shuffled Groups</MudSelectItem>
|
||||
@if (_selectedItem.CanFillWithGroups)
|
||||
{
|
||||
<MudSelectItem Value="FillWithGroupMode.FillWithOrderedGroups">Ordered Groups</MudSelectItem>
|
||||
<MudSelectItem Value="FillWithGroupMode.FillWithShuffledGroups">Shuffled Groups</MudSelectItem>
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedItem.FillWithGroupMode = FillWithGroupMode.None;
|
||||
}
|
||||
</MudSelect>
|
||||
<MudSelect Class="mt-3" Label="Tail Mode" @bind-Value="@_selectedItem.TailMode" For="@(() => _selectedItem.TailMode)" Disabled="@(_selectedItem.PlayoutMode != PlayoutMode.Duration)">
|
||||
<MudSelectItem Value="@TailMode.None">(none)</MudSelectItem>
|
||||
|
||||
@@ -41,6 +41,7 @@ public class ProgramScheduleItemEditViewModel : INotifyPropertyChanged
|
||||
|
||||
public bool CanFillWithGroups =>
|
||||
PlayoutMode is PlayoutMode.Multiple or PlayoutMode.Duration
|
||||
&& PlaybackOrder is not PlaybackOrder.ShuffleInOrder
|
||||
&& CollectionType is ProgramScheduleItemCollectionType.Collection
|
||||
or ProgramScheduleItemCollectionType.MultiCollection or ProgramScheduleItemCollectionType.SmartCollection;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user