From 57cd791348544802cd1135c6e0f3484ba1dc5ed7 Mon Sep 17 00:00:00 2001 From: Alex X Date: Sat, 1 Mar 2025 20:00:59 +0300 Subject: [PATCH] Fix ONVIF client GetCapabilities request --- pkg/onvif/client.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/onvif/client.go b/pkg/onvif/client.go index cb6221e1..936f65f6 100644 --- a/pkg/onvif/client.go +++ b/pkg/onvif/client.go @@ -159,9 +159,12 @@ func (c *Client) GetServiceCapabilities() ([]byte, error) { } func (c *Client) DeviceRequest(operation string) ([]byte, error) { - if operation == DeviceGetServices { + switch operation { + case DeviceGetServices: operation = `true` - } else { + case DeviceGetCapabilities: + operation = `All` + default: operation = `` } return c.Request(c.deviceURL, operation)