fix: remove recording tag from non-recorded endpoints
This commit is contained in:
@ -57,8 +57,13 @@ public class StreamEventBuilder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (status == "ended")
|
else if (status == "ended")
|
||||||
|
{
|
||||||
|
if (stream.Endpoint.Capabilities
|
||||||
|
.Any(a => a.StartsWith("dvr:", StringComparison.InvariantCultureIgnoreCase)))
|
||||||
{
|
{
|
||||||
tags.Add(new("recording", new Uri(_config.DataHost, $"recording/{stream.Id}.m3u8").ToString()));
|
tags.Add(new("recording", new Uri(_config.DataHost, $"recording/{stream.Id}.m3u8").ToString()));
|
||||||
|
}
|
||||||
|
|
||||||
if (stream.Ends.HasValue)
|
if (stream.Ends.HasValue)
|
||||||
{
|
{
|
||||||
tags.Add(new("ends", new DateTimeOffset(stream.Ends.Value).ToUnixTimeSeconds().ToString()));
|
tags.Add(new("ends", new DateTimeOffset(stream.Ends.Value).ToUnixTimeSeconds().ToString()));
|
||||||
|
Reference in New Issue
Block a user