tokens refresh on media start
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user