Add GET /api/guide returning a per-channel EPG grid (ChannelGuideResponseModel). start defaults to now, end defaults to now + XmltvDaysToBuild. Extract the guide-group/filler-merge projection (ChannelGuideProjector) and programme-metadata resolution (ChannelGuideMetadata) plus the metadata eager-load (IncludeGuideMetadata) out of RefreshChannelDataHandler so the XMLTV cache builder and the JSON guide share one source of truth and cannot drift. XMLTV output is unchanged (ChannelGuideGoldenTests pass without regeneration). The JSON handler mirrors XMLTV semantics: ShowInEpg-only channels, decimal channel ordering, ExternalJson playouts skipped, mirror playout offset applied to copies (never mutating the loaded entities). SubTitle/Category are nullable. refs #102 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
11 lines
414 B
C#
11 lines
414 B
C#
using ErsatzTV.Core.Api.Channels;
|
|
|
|
namespace ErsatzTV.Application.Channels;
|
|
|
|
/// <summary>
|
|
/// JSON channel-guide query for the EPG grid. <paramref name="Start" /> defaults to now and
|
|
/// <paramref name="End" /> defaults to now + the configured XmltvDaysToBuild window.
|
|
/// </summary>
|
|
public record GetChannelGuideData(DateTimeOffset? Start, DateTimeOffset? End)
|
|
: IRequest<ChannelGuideResponseModel>;
|