Fix: Track() for ID3v1.1 picked a wrong byte for the track number delimeter in

the comment field.
This results in neither the track number nor the comment being set properly.
This commit is contained in:
upperstream
2016-07-17 08:16:53 +10:00
committed by David Howden
parent c119c3eeeb
commit ae005145bc
+3 -3
View File
@@ -75,16 +75,16 @@ func ReadID3v1Tags(r io.ReadSeeker) (Metadata, error) {
return nil, err
}
commentBytes, err := readBytes(r, 29)
commentBytes, err := readBytes(r, 30)
if err != nil {
return nil, err
}
var comment string
var track int
if commentBytes[27] == 0 {
if commentBytes[28] == 0 {
comment = strings.TrimSpace(string(commentBytes[:28]))
track = int(commentBytes[28])
track = int(commentBytes[29])
}
var genre string