add multi-episode group size (#2164)
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
case MultipleMode.PlaylistItemSize:
|
||||
mode = "Playlist Item Size";
|
||||
break;
|
||||
case MultipleMode.MultiEpisodeGroupSize:
|
||||
mode = "Multi-Episode Group Size";
|
||||
break;
|
||||
case MultipleMode.Count:
|
||||
default:
|
||||
mode += $" ({_selectedItem.MultipleCount})";
|
||||
@@ -110,6 +113,9 @@
|
||||
case MultipleMode.PlaylistItemSize:
|
||||
@:Playlist Item Size
|
||||
break;
|
||||
case MultipleMode.MultiEpisodeGroupSize:
|
||||
@:Multi-Episode Group Size
|
||||
break;
|
||||
case MultipleMode.Count:
|
||||
default:
|
||||
@($"Multiple ({context.MultipleCount})")
|
||||
@@ -379,6 +385,7 @@
|
||||
</div>
|
||||
<MudSelect @bind-Value="@_selectedItem.MultipleMode" For="@(() => _selectedItem.MultipleMode)">
|
||||
<MudSelectItem Value="MultipleMode.Count">Count</MudSelectItem>
|
||||
|
||||
@if (_selectedItem.CollectionType is not ProgramScheduleItemCollectionType.Playlist)
|
||||
{
|
||||
<MudSelectItem Value="MultipleMode.CollectionSize">Collection Size</MudSelectItem>
|
||||
@@ -387,6 +394,11 @@
|
||||
{
|
||||
<MudSelectItem Value="MultipleMode.PlaylistItemSize">Playlist Item Size</MudSelectItem>
|
||||
}
|
||||
|
||||
@if (_selectedItem.PlaybackOrder is PlaybackOrder.Chronological)
|
||||
{
|
||||
<MudSelectItem Value="MultipleMode.MultiEpisodeGroupSize">Multi-Episode Group Size</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
</MudStack>
|
||||
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
|
||||
|
||||
@@ -20,6 +20,7 @@ public class ProgramScheduleItemEditViewModel : INotifyPropertyChanged
|
||||
private int _playoutDurationHours;
|
||||
private int _playoutDurationMinutes;
|
||||
private TimeSpan? _startTime;
|
||||
private PlaybackOrder _playbackOrder;
|
||||
|
||||
public int Id { get; set; }
|
||||
public int Index { get; set; }
|
||||
@@ -61,10 +62,17 @@ public class ProgramScheduleItemEditViewModel : INotifyPropertyChanged
|
||||
MediaItem = null;
|
||||
SmartCollection = null;
|
||||
|
||||
if (_collectionType != ProgramScheduleItemCollectionType.Playlist &&
|
||||
MultipleMode is MultipleMode.PlaylistItemSize)
|
||||
{
|
||||
MultipleMode = MultipleMode.Count;
|
||||
}
|
||||
|
||||
OnPropertyChanged(nameof(Collection));
|
||||
OnPropertyChanged(nameof(MultiCollection));
|
||||
OnPropertyChanged(nameof(MediaItem));
|
||||
OnPropertyChanged(nameof(SmartCollection));
|
||||
OnPropertyChanged(nameof(MultiCollection));
|
||||
}
|
||||
|
||||
if (_collectionType == ProgramScheduleItemCollectionType.MultiCollection)
|
||||
@@ -102,7 +110,28 @@ public class ProgramScheduleItemEditViewModel : INotifyPropertyChanged
|
||||
_ => string.Empty
|
||||
};
|
||||
|
||||
public PlaybackOrder PlaybackOrder { get; set; }
|
||||
public PlaybackOrder PlaybackOrder
|
||||
{
|
||||
get => _playbackOrder;
|
||||
set
|
||||
{
|
||||
if (value == _playbackOrder)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_playbackOrder = value;
|
||||
|
||||
if (_playbackOrder is not PlaybackOrder.Chronological && MultipleMode is MultipleMode.MultiEpisodeGroupSize)
|
||||
{
|
||||
MultipleMode = MultipleMode.Count;
|
||||
}
|
||||
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(CanFillWithGroups));
|
||||
OnPropertyChanged(nameof(MultipleMode));
|
||||
}
|
||||
}
|
||||
|
||||
public MultipleMode MultipleMode { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user