Skip unsupported cameras (gwell based)

This commit is contained in:
seydx
2026-01-12 11:22:25 +01:00
parent 439dccf4bd
commit 25e3125a89
2 changed files with 5 additions and 6 deletions
+2 -6
View File
@@ -93,12 +93,10 @@ func apiDeviceList(w http.ResponseWriter, r *http.Request) {
var items []*api.Source
for _, cam := range cameras {
streamURL := buildStreamURL(cam)
items = append(items, &api.Source{
Name: cam.Nickname,
Info: fmt.Sprintf("%s | %s | %s", cam.ProductModel, cam.MAC, cam.IP),
URL: streamURL,
URL: buildStreamURL(cam),
})
}
@@ -171,12 +169,10 @@ func apiAuth(w http.ResponseWriter, r *http.Request) {
var items []*api.Source
for _, cam := range cameras {
streamURL := buildStreamURL(cam)
items = append(items, &api.Source{
Name: cam.Nickname,
Info: fmt.Sprintf("%s | %s | %s", cam.ProductModel, cam.MAC, cam.IP),
URL: streamURL,
URL: buildStreamURL(cam),
})
}
+3
View File
@@ -196,6 +196,9 @@ func (c *Cloud) GetCameraList() ([]*Camera, error) {
if dev.ProductType != "Camera" {
continue
}
if dev.DeviceParams.IP == "" {
continue // skip cameras without IP (gwell protocol)
}
c.cameras = append(c.cameras, &Camera{
MAC: dev.MAC,