mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
685 B
25 lines
685 B
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() |
|
{ |
|
// do nothing |
|
} |
|
}
|
|
|