* add chapter statistics and new filler options * refactor playout builder * more refactor prep for filler * rewrite schedulers * refactor collectionkey * add tail filler kind * migrate tail filler to filler preset * optionally show filler * fix playout detail row count * remove duration tail filler options * implement tail and fallback in flood scheduler * implement tail and fallback in one scheduler * implement tail and fallback in multiple scheduler * implement looping fallback filler * more duration tests * start to add post-roll filler to flood * rework playoutitem filler tagging * rework scheduler logging * calculate whether configured filler will fit * implement pre-roll and post-roll duration and count filler * improve duration filler calculation * add minutes to search index * update channel guide to work with new filler * add mid-roll filler * don't clone enumerators for filler calculations * support pre-roll and post-roll pad filler * implement mid-roll pad filler * allow clearing filler selections in schedule editor * fix tests * filler config validation * use consistent time zone for tests
46 lines
1.7 KiB
C#
46 lines
1.7 KiB
C#
using System;
|
|
using ErsatzTV.Application.Filler;
|
|
using ErsatzTV.Application.MediaCollections;
|
|
using ErsatzTV.Application.MediaItems;
|
|
using ErsatzTV.Core.Domain;
|
|
|
|
namespace ErsatzTV.Application.ProgramSchedules
|
|
{
|
|
public abstract record ProgramScheduleItemViewModel(
|
|
int Id,
|
|
int Index,
|
|
StartType StartType,
|
|
TimeSpan? StartTime,
|
|
PlayoutMode PlayoutMode,
|
|
ProgramScheduleItemCollectionType CollectionType,
|
|
MediaCollectionViewModel Collection,
|
|
MultiCollectionViewModel MultiCollection,
|
|
SmartCollectionViewModel SmartCollection,
|
|
NamedMediaItemViewModel MediaItem,
|
|
PlaybackOrder PlaybackOrder,
|
|
string CustomTitle,
|
|
GuideMode GuideMode,
|
|
FillerPresetViewModel PreRollFiller,
|
|
FillerPresetViewModel MidRollFiller,
|
|
FillerPresetViewModel PostRollFiller,
|
|
FillerPresetViewModel TailFiller,
|
|
FillerPresetViewModel FallbackFiller)
|
|
{
|
|
public string Name => CollectionType switch
|
|
{
|
|
ProgramScheduleItemCollectionType.Collection => Collection?.Name,
|
|
ProgramScheduleItemCollectionType.TelevisionShow =>
|
|
MediaItem?.Name, // $"{TelevisionShow?.Title} ({TelevisionShow?.Year})",
|
|
ProgramScheduleItemCollectionType.TelevisionSeason =>
|
|
MediaItem?.Name, // $"{TelevisionSeason?.Title} ({TelevisionSeason?.Plot})",
|
|
ProgramScheduleItemCollectionType.Artist =>
|
|
MediaItem?.Name,
|
|
ProgramScheduleItemCollectionType.MultiCollection =>
|
|
MultiCollection?.Name,
|
|
ProgramScheduleItemCollectionType.SmartCollection =>
|
|
SmartCollection?.Name,
|
|
_ => string.Empty
|
|
};
|
|
}
|
|
}
|