-
cooper2001Hi sentriz, I have a question regarding filepaths. I want the CatalogNumber in the path and can't get my head around, how to get it there. {{ with .Release.LabelInfo }} ({{ .CatalogNumber | safepath }}){{end}} or any other variation i tried gets me an error " can't evaluate field LabelInfo in type []musicbrainz.LabelInfo"
-
sentrizcooper2001: ah, its beause releases have multiple label infos
-
sentriz
-
sentriz
-
sentrizso its .Release.LabelInfo[0]
-
sentrizor find the first one in the list
-
cooper2001Ah, thanks. I changed it to {{ range .Release.LabelInfo }} ({{ .CatalogNumber | safepath }}){{end}} and it's working. How would it be best to find the first on the list? If i put [0] in .Release.LabelInfo[0] i get an error " bad character U+005B '['"
-
sentrizcooper2001: heres a working example go.dev/play/p/_tHZ92uclLP
-
cooper2001thanks a lot :)
-
sentrizno prob!