From 7d16421618d2b9839f63e0f1847e8badd307b08d Mon Sep 17 00:00:00 2001 From: Wyatt Baggett Date: Sun, 8 Feb 2026 14:41:45 -0500 Subject: [PATCH] Adds video availability flag to sitemap data Extends message metadata with a boolean that indicates whether a video is available and populates it during mapping based on the presence of a video URL. Improves consumer handling by enabling rendering, filtering, and indexing decisions without inspecting raw URLs, providing clearer content metadata for downstream use. --- .../Responses/SitemapMessageData.cs | 5 +++++ .../Services/SermonsService.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/API/ThriveChurchOfficialAPI/ThriveChurchOfficialAPI.Core/Responses/SitemapMessageData.cs b/API/ThriveChurchOfficialAPI/ThriveChurchOfficialAPI.Core/Responses/SitemapMessageData.cs index 86e2e62..86c96df 100644 --- a/API/ThriveChurchOfficialAPI/ThriveChurchOfficialAPI.Core/Responses/SitemapMessageData.cs +++ b/API/ThriveChurchOfficialAPI/ThriveChurchOfficialAPI.Core/Responses/SitemapMessageData.cs @@ -16,6 +16,11 @@ public class SitemapMessageData /// The date this message was given /// public DateTime? Date { get; set; } + + /// + /// Whether this message has a video available + /// + public bool HasVideo { get; set; } } } diff --git a/API/ThriveChurchOfficialAPI/ThriveChurchOfficialAPI.Services/Services/SermonsService.cs b/API/ThriveChurchOfficialAPI/ThriveChurchOfficialAPI.Services/Services/SermonsService.cs index 02798bb..0caefae 100644 --- a/API/ThriveChurchOfficialAPI/ThriveChurchOfficialAPI.Services/Services/SermonsService.cs +++ b/API/ThriveChurchOfficialAPI/ThriveChurchOfficialAPI.Services/Services/SermonsService.cs @@ -1918,7 +1918,8 @@ public async Task> GetSitemapData() Messages = series.Messages?.Select(msg => new SitemapMessageData { Id = msg.MessageId, - Date = msg.Date + Date = msg.Date, + HasVideo = !string.IsNullOrEmpty(msg.VideoUrl) }).ToList() ?? new List() }).ToList() };