Skip to content

Commit

Permalink
add disc total
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaarey committed May 4, 2024
1 parent 404cc6e commit 45fe214
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ func writeM4a(w *mp4.Writer, info *SongInfo, meta *AutoGenerated, data []byte, t
if meta.Data[0].Relationships.Tracks.Data[trackTotal - 1].Attributes.DiscNumber > 1{
disk := make([]byte, 8)
binary.BigEndian.PutUint32(disk, uint32(meta.Data[0].Relationships.Tracks.Data[index].Attributes.DiscNumber))
binary.BigEndian.PutUint16(disk[4:], uint16(meta.Data[0].Relationships.Tracks.Data[trackTotal - 1].Attributes.DiscNumber))
err = addMeta(mp4.BoxType{'d', 'i', 's', 'k'}, disk)
if err != nil {
return err
Expand Down

0 comments on commit 45fe214

Please sign in to comment.