Fix ONVIF library integration and improve stream discovery
- Fix ONVIF CallMethod response parsing (returns *http.Response, not structs) - Add proper XML SOAP envelope parsing for GetProfiles and GetStreamUri - Use correct types from xsd/onvif package (StreamType, TransportProtocol, ReferenceToken) - Add strix binary to .gitignore - Update configuration and API routes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,10 @@ func (l *Loader) ListBrands() ([]string, error) {
|
||||
var brands []string
|
||||
for _, file := range files {
|
||||
if !file.IsDir() && strings.HasSuffix(file.Name(), ".json") {
|
||||
// Skip index files
|
||||
if file.Name() == "index.json" || file.Name() == "indexa.json" {
|
||||
continue
|
||||
}
|
||||
brandID := strings.TrimSuffix(file.Name(), ".json")
|
||||
brands = append(brands, brandID)
|
||||
}
|
||||
@@ -157,6 +161,11 @@ func (l *Loader) StreamingSearch(searchFunc func(*models.Camera) bool) ([]*model
|
||||
continue
|
||||
}
|
||||
|
||||
// Skip index.json as it contains brand list, not camera data
|
||||
if file.Name() == "index.json" || file.Name() == "indexa.json" {
|
||||
continue
|
||||
}
|
||||
|
||||
filePath := filepath.Join(l.brandsPath, file.Name())
|
||||
camera, err := l.loadCameraFromFile(filePath)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user