Add go2rtc module, test/config/urls pages, Frigate config fixes

This commit is contained in:
eduard256
2026-03-26 22:45:32 +00:00
parent 8dc8ba1096
commit f34a7b96c7
12 changed files with 2411 additions and 52 deletions
+9 -1
View File
@@ -1,6 +1,7 @@
package frigate
import (
"encoding/json"
"io"
"net/http"
"sync"
@@ -99,10 +100,17 @@ func apiConfig(w http.ResponseWriter, r *http.Request) {
body, _ := io.ReadAll(resp.Body)
// Frigate /api/config/raw returns JSON-encoded string, unquote it
config := string(body)
var unquoted string
if err := json.Unmarshal(body, &unquoted); err == nil {
config = unquoted
}
api.ResponseJSON(w, map[string]any{
"connected": true,
"url": url,
"config": string(body),
"config": config,
})
}