From 4d2eaefe1fb52b37e7bd119d5a722743676ef878 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Fri, 10 Jan 2025 20:15:13 -0500 Subject: [PATCH] Write order for m3u --- pkg/rest/incidents.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/rest/incidents.go b/pkg/rest/incidents.go index e69f5f2..7488aeb 100644 --- a/pkg/rest/incidents.go +++ b/pkg/rest/incidents.go @@ -202,7 +202,7 @@ func (ia *incidentsAPI) getCallsM3U(w http.ResponseWriter, r *http.Request) { return } - var b bytes.Buffer + b := new(bytes.Buffer) callUrl := common.PtrTo(*ia.baseURL) @@ -220,7 +220,7 @@ func (ia *incidentsAPI) getCallsM3U(w http.ResponseWriter, r *http.Request) { callUrl.Path = "/api/call/" + c.ID.String() - fmt.Fprintf(w, "#EXTINF:%d,%s%s (%s)\n%s\n\n", + fmt.Fprintf(b, "#EXTINF:%d,%s%s (%s)\n%s\n\n", c.Duration.Seconds(), tg.StringTag(true), from,