add playlist item count and shuffle playlist items (#2407)

* marathon cleanup

* add playlist item count, and shuffle playlist items
This commit is contained in:
Jason Dove
2025-09-12 14:19:05 +00:00
committed by GitHub
parent 4e065fe922
commit 17c7774603
19 changed files with 12971 additions and 24 deletions
@@ -9,6 +9,8 @@ namespace ErsatzTV.ViewModels;
public class PlaylistItemEditViewModel : INotifyPropertyChanged
{
private ProgramScheduleItemCollectionType _collectionType;
private int? _count;
private bool _playAll;
public int Id { get; set; }
public int Index { get; set; }
@@ -81,7 +83,51 @@ public class PlaylistItemEditViewModel : INotifyPropertyChanged
public PlaybackOrder PlaybackOrder { get; set; }
public bool PlayAll { get; set; }
public int? Count
{
get => _count;
set
{
if (value == _count)
{
return;
}
_count = value;
OnPropertyChanged();
if (_count is not null)
{
_playAll = false;
OnPropertyChanged(nameof(PlayAll));
}
}
}
public bool PlayAll
{
get => _playAll;
set
{
if (value == _playAll)
{
return;
}
_playAll = value;
OnPropertyChanged();
if (_playAll)
{
_count = null;
}
else
{
_count ??= 1;
}
OnPropertyChanged(nameof(Count));
}
}
public bool IncludeInProgramGuide { get; set; }