ring: skip refetching cameras to increase loading speed and refactor ring url

This commit is contained in:
seydx
2025-05-08 16:09:04 +02:00
parent 7107508286
commit 124556f4db
4 changed files with 20 additions and 27 deletions
+3
View File
@@ -5,6 +5,8 @@ import (
"net/http"
"net/url"
"fmt"
"github.com/AlexxIT/go2rtc/internal/api"
"github.com/AlexxIT/go2rtc/internal/streams"
"github.com/AlexxIT/go2rtc/pkg/core"
@@ -83,6 +85,7 @@ func apiRing(w http.ResponseWriter, r *http.Request) {
var items []*api.Source
for _, camera := range devices.AllCameras {
cleanQuery.Set("camera_id", fmt.Sprint(camera.ID))
cleanQuery.Set("device_id", camera.DeviceID)
// Stream source