* rename collection type * split collections into separate pages * add rerun collection types, migration, editor * add rerun to classic schedule items * rerun plumbing in classic playout builder * start to implement rerun enumerator * add scheduledAt to enumerator movenext * maintain rerun history in db * fix shuffle * fix rerun allowed playback orders * fix updating rerun collections * update changelog; fix editing * update changelog
26 lines
719 B
C#
26 lines
719 B
C#
using ErsatzTV.Core.Domain;
|
|
using ErsatzTV.Core.Extensions;
|
|
using ErsatzTV.Core.Interfaces.Scheduling;
|
|
|
|
namespace ErsatzTV.Core.Scheduling;
|
|
|
|
public class SingleMediaItemEnumerator(MediaItem mediaItem) : IMediaCollectionEnumerator
|
|
{
|
|
public CollectionEnumeratorState State { get; } = new();
|
|
public Option<MediaItem> Current => mediaItem;
|
|
public Option<bool> CurrentIncludeInProgramGuide => Option<bool>.None;
|
|
|
|
public int Count => 1;
|
|
public Option<TimeSpan> MinimumDuration => mediaItem.GetNonZeroDuration();
|
|
|
|
public void ResetState(CollectionEnumeratorState state)
|
|
{
|
|
// do nothing
|
|
}
|
|
|
|
public void MoveNext(Option<DateTimeOffset> scheduledAt)
|
|
{
|
|
// do nothing
|
|
}
|
|
}
|