From 85e25ca6eaed01b00dc4b8be1de3c80e81c09a86 Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:16:09 -0600 Subject: [PATCH] add channel start time template data (#2698) * add channel start time template data * rename --- CHANGELOG.md | 2 ++ ErsatzTV.Core/Metadata/ChannelTemplateDataKey.cs | 6 ++++++ .../Streaming/Graphics/GraphicsElementLoader.cs | 1 + 3 files changed, 9 insertions(+) create mode 100644 ErsatzTV.Core/Metadata/ChannelTemplateDataKey.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index 130bb60f5..fe50d5826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Add framerate template data - `RFrameRate` - the real content framerate (or channel normalized framerate) as reported by ffmpeg, e.g. `30000/1001` - `FrameRate` - the decimal representation of `RFrameRate`, e.g. `29.97002997` + - Add `Channel_StartTime` template data + - This indicates the time that the transcode session started for the current channel - Add remote stream metadata - Remote stream definitions (yaml files) can now contain `title`, `plot`, `year` and `content_rating` fields - Remote streams can now have thumbnails (same name as yaml file but with image extension) diff --git a/ErsatzTV.Core/Metadata/ChannelTemplateDataKey.cs b/ErsatzTV.Core/Metadata/ChannelTemplateDataKey.cs new file mode 100644 index 000000000..7cd0fa084 --- /dev/null +++ b/ErsatzTV.Core/Metadata/ChannelTemplateDataKey.cs @@ -0,0 +1,6 @@ +namespace ErsatzTV.Core.Metadata; + +public static class ChannelTemplateDataKey +{ + public static readonly string ChannelStartTime = "Channel_StartTime"; +} diff --git a/ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementLoader.cs b/ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementLoader.cs index 039089d4a..754ad7d61 100644 --- a/ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementLoader.cs +++ b/ErsatzTV.Infrastructure/Streaming/Graphics/GraphicsElementLoader.cs @@ -249,6 +249,7 @@ public partial class GraphicsElementLoader( [FFmpegProfileTemplateDataKey.ScaledResolution] = context.SquarePixelFrameSize, [FFmpegProfileTemplateDataKey.RFrameRate] = context.FrameRate.RFrameRate, [FFmpegProfileTemplateDataKey.FrameRate] = context.FrameRate.ParsedFrameRate, + [ChannelTemplateDataKey.ChannelStartTime] = context.ChannelStartTime, [MediaItemTemplateDataKey.StreamSeek] = context.Seek, [MediaItemTemplateDataKey.Start] = context.ContentStartTime, [MediaItemTemplateDataKey.Stop] = context.ContentStartTime + context.Duration