Fix -- Use validTo time for live streams
All checks were successful
🏗️ Build Plugin / build (push) Successful in 2m22s
🧪 Test Plugin / test (push) Successful in 1m6s

This commit is contained in:
Duncan Tourolle 2025-11-15 16:09:46 +01:00
parent 31b2402a96
commit d48b515898

View File

@ -231,7 +231,8 @@ public class SRFPlayChannel : IChannel, IHasCacheKey
.Where(p => p.Urn != null &&
!string.IsNullOrEmpty(p.Title) &&
p.ValidFrom != null &&
p.ValidFrom.Value.ToUniversalTime() <= weekFromNow)
p.ValidFrom.Value.ToUniversalTime() <= weekFromNow &&
(p.ValidTo == null || p.ValidTo.Value.ToUniversalTime() > now))
.OrderBy(p => p.ValidFrom)
.ToList();