Skip to content

Commit

Permalink
Added xml /Ableton/LiveSet/Annotation mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianrudnik committed Nov 1, 2023
1 parent 7098b04 commit a3ba6de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions service/internal/indexer/mapping_live_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type LiveSetDocument struct {
MinorVersion string `json:"minorVersion,omitempty"`
Creator string `json:"creator,omitempty"`
Revision string `json:"revision,omitempty"`
Annotation string `json:"annotation,omitempty"`

Scale string `json:"scale,omitempty"`
ScaleName string `json:"scaleName,omitempty"`
Expand Down Expand Up @@ -58,6 +59,7 @@ func buildLiveSetMapping() *mapping.DocumentMapping {
m.AddFieldMappingsAt("minorVersion", NewPayloadFieldMapping())
m.AddFieldMappingsAt("creator", mapping.NewKeywordFieldMapping())
m.AddFieldMappingsAt("revision", NewPayloadFieldMapping())
m.AddFieldMappingsAt("annotation", NewFulltextTextFieldMapping(true))

m.AddFieldMappingsAt("scale", mapping.NewKeywordFieldMapping())
m.AddFieldMappingsAt("scaleName", mapping.NewKeywordFieldMapping())
Expand Down
1 change: 1 addition & 0 deletions service/internal/parser/ablv5parser/parse_live_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ func ParseLiveSet(m *stats.Metrics, path string, data *ablv5schema.Ableton) *pip
liveSet.MinorVersion = data.MinorVersion
liveSet.Creator = data.Creator
liveSet.Revision = data.Revision
liveSet.Annotation = data.LiveSet.Annotation.Value

liveSet.ScaleRootNote = data.LiveSet.ScaleInformation.HumanizeRootNote()
liveSet.ScaleName = data.LiveSet.ScaleInformation.Name.Value
Expand Down
1 change: 1 addition & 0 deletions service/internal/parser/ablv5schema/xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type LiveSet struct {
ScaleInformation ScaleInformation `xml:"ScaleInformation"`
InKey BooleanValue `xml:"InKey"`
MasterTrack MasterTrack `xml:"MasterTrack"`
Annotation StringValue `xml:"Annotation"`
}

type Tracks struct {
Expand Down

0 comments on commit a3ba6de

Please sign in to comment.