Rename meta to metadata

This commit is contained in:
Eran Gonen 2025-11-27 09:12:20 +02:00
parent bbaf4b1eaf
commit a4dbcad00b
4 changed files with 30 additions and 30 deletions

View file

@ -619,9 +619,9 @@ func (a *API) onPathsCameras(ctx *gin.Context) {
cameraItem := map[string]any{
"name": item.Name,
}
if item.Meta != nil {
// Merge meta fields at the same level as name
for k, v := range item.Meta {
if item.Metadata != nil {
// Merge metadata fields at the same level as name
for k, v := range item.Metadata {
cameraItem[k] = v
}
}

View file

@ -123,7 +123,7 @@ type Path struct {
UseAbsoluteTimestamp bool `json:"useAbsoluteTimestamp"`
CalcBitrateWindow Duration `json:"calcBitrateWindow"`
DropNonKeyframes bool `json:"dropNonKeyframes"`
Meta map[string]any `json:"meta" yaml:"meta"`
Metadata map[string]any `json:"metadata" yaml:"metadata"`
// Record
Record bool `json:"record"`

View file

@ -653,7 +653,7 @@ func (pa *path) doAPIPathsGet(req pathAPIPathsGetReq) {
}
return &ts
}(),
Meta: pa.conf.Meta,
Metadata: pa.conf.Metadata,
},
}
}

View file

@ -87,7 +87,7 @@ type APIPath struct {
Readers []APIPathSourceOrReader `json:"readers"`
BitrateReceived float64 `json:"bitrateReceived"`
LastRTPTimestamp *int64 `json:"lastRTPTimestamp"`
Meta map[string]any `json:"meta,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
// APIPathList is a list of paths.