tokens refresh on media start
🏗️ Build Plugin / build (push) Successful in 2m19s
🧪 Test Plugin / test (push) Successful in 1m8s
🚀 Release Plugin / build-and-release (push) Successful in 2m18s

This commit is contained in:
2025-11-15 17:51:14 +01:00
parent d48b515898
commit 8e86db100a
3 changed files with 38 additions and 86 deletions
@@ -144,23 +144,6 @@ public class StreamUrlResolver : IDisposable
/// <returns>True if playable content is available.</returns>
public bool HasPlayableContent(Chapter chapter)
{
// For scheduled livestreams that haven't started yet, resources won't exist
// but we still want to show them. The stream will become available when the event starts.
if (chapter?.Type == "SCHEDULED_LIVESTREAM")
{
var now = DateTime.UtcNow;
var hasStarted = chapter.ValidFrom == null || chapter.ValidFrom.Value.ToUniversalTime() <= now;
if (!hasStarted)
{
_logger.LogInformation(
"Scheduled livestream '{Title}' hasn't started yet (starts at {ValidFrom}), will be playable when live",
chapter.Title,
chapter.ValidFrom);
return true; // Show it, stream will be available when event starts
}
}
if (chapter?.ResourceList == null || chapter.ResourceList.Count == 0)
{
return false;