From 3148b2cf6f11c83b519b680df3155391360fe585 Mon Sep 17 00:00:00 2001 From: kieran Date: Mon, 19 Aug 2024 10:09:23 +0100 Subject: [PATCH] fix: remove recording tag from non-recorded endpoints --- NostrStreamer/Services/StreamEventBuilder.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NostrStreamer/Services/StreamEventBuilder.cs b/NostrStreamer/Services/StreamEventBuilder.cs index f915918..494f35e 100644 --- a/NostrStreamer/Services/StreamEventBuilder.cs +++ b/NostrStreamer/Services/StreamEventBuilder.cs @@ -58,7 +58,12 @@ public class StreamEventBuilder } else if (status == "ended") { - tags.Add(new("recording", new Uri(_config.DataHost, $"recording/{stream.Id}.m3u8").ToString())); + if (stream.Endpoint.Capabilities + .Any(a => a.StartsWith("dvr:", StringComparison.InvariantCultureIgnoreCase))) + { + tags.Add(new("recording", new Uri(_config.DataHost, $"recording/{stream.Id}.m3u8").ToString())); + } + if (stream.Ends.HasValue) { tags.Add(new("ends", new DateTimeOffset(stream.Ends.Value).ToUnixTimeSeconds().ToString()));