From eb65071b51cc903488d5613d462e452bb811c57d Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 8 Oct 2023 01:23:28 +0400 Subject: [PATCH] In OggFile.GetTag() was added another layer of indexing, this time we are looking for a capitalised tag name (e.g. Artist). Why there's no consistency in OGG vorbis tags..? *Sigh* --- pkg/oggtag/oggtag.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/oggtag/oggtag.go b/pkg/oggtag/oggtag.go index 5eb3175..df45911 100644 --- a/pkg/oggtag/oggtag.go +++ b/pkg/oggtag/oggtag.go @@ -74,7 +74,9 @@ func (of *OggFile) GetTag(tag string) string { tagIdx := bytes.Index(of.bufHead, append([]byte{0, 0, 0}, (tag+"=")...)) if tagIdx == -1 { if tagIdx = bytes.Index(of.bufHead, append([]byte{0, 0, 0}, (strings.ToUpper(tag)+"=")...)); tagIdx == -1 { - return "" + if tagIdx = bytes.Index(of.bufHead, append([]byte{0, 0, 0}, (strings.Title(tag)+"=")...)); tagIdx == -1 { + return "" + } } } tagIdx += 3