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:
parent
c119c3eeeb
commit
ae005145bc
6
id3v1.go
6
id3v1.go
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user