Files
ersatztv/ErsatzTV.Core/Interfaces/Scheduling/IRerunHelper.cs
T
Jason DoveandGitHub 245165c9d9 add rerun collection type (#2421)
* 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
2025-09-15 18:27:55 +00:00

36 lines
1008 B
C#

using ErsatzTV.Core.Domain;
using ErsatzTV.Core.Domain.Scheduling;
using ErsatzTV.Core.Scheduling;
namespace ErsatzTV.Core.Interfaces.Scheduling;
public interface IRerunHelper
{
bool ClearHistory { get; set; }
Task InitWithMediaItems(
int playoutId,
CollectionKey collectionKey,
List<MediaItem> mediaItems,
CancellationToken cancellationToken);
IMediaCollectionEnumerator CreateEnumerator(
CollectionKey collectionKey,
CollectionEnumeratorState state,
CancellationToken cancellationToken);
bool IsFirstRun(CollectionKey collectionKey, int mediaItemId);
bool IsRerun(CollectionKey collectionKey, int mediaItemId);
int FirstRunCount(CollectionKey collectionKey);
int RerunCount(CollectionKey collectionKey);
void AddToHistory(CollectionKey collectionKey, int mediaItemId, DateTimeOffset scheduledAt);
System.Collections.Generic.HashSet<int> GetHistoryToRemove();
List<RerunHistory> GetHistoryToAdd();
}