Update main.go

Fix Album Artist Metadata. 
=albumartistname
pull/23/head
hanafizaki 4 months ago committed by GitHub
parent 726a21fb53
commit e799a3ef3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      main.go

@ -774,12 +774,12 @@ func writeM4a(w *mp4.Writer, info *SongInfo, meta *AutoGenerated, data []byte, t
if len(meta.Data) > 0 { if len(meta.Data) > 0 {
album := meta.Data[0] album := meta.Data[0]
err = addMeta(mp4.BoxType{'a', 'A', 'R', 'T'}, meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName) err = addMeta(mp4.BoxType{'a', 'A', 'R', 'T'}, album.Attributes.ArtistName)
if err != nil { if err != nil {
return err return err
} }
err = addMeta(mp4.BoxType{'s', 'o', 'a', 'a'}, meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName) err = addMeta(mp4.BoxType{'s', 'o', 'a', 'a'}, album.Attributes.ArtistName)
if err != nil { if err != nil {
return err return err
} }

Loading…
Cancel
Save