fix artistid
This commit is contained in:
parent
63290b67b7
commit
b55788e9fe
18
main.go
18
main.go
@ -818,15 +818,17 @@ func writeM4a(w *mp4.Writer, info *SongInfo, meta *AutoGenerated, data []byte, t
|
||||
}
|
||||
}
|
||||
|
||||
if len(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID) > 0 {
|
||||
atID, err := strconv.ParseUint(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID, 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data) > 0 {
|
||||
if len(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID) > 0 {
|
||||
atID, err := strconv.ParseUint(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID, 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = addMeta(mp4.BoxType{'a', 't', 'I', 'D'}, uint32(atID))
|
||||
if err != nil {
|
||||
return err
|
||||
err = addMeta(mp4.BoxType{'a', 't', 'I', 'D'}, uint32(atID))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
trkn := make([]byte, 8)
|
||||
|
@ -812,16 +812,17 @@ func writeM4a(w *mp4.Writer, info *SongInfo, meta *AutoGenerated, data []byte, t
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data) > 0 {
|
||||
if len(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID) > 0 {
|
||||
atID, err := strconv.ParseUint(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID, 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID) > 0 {
|
||||
atID, err := strconv.ParseUint(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID, 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = addMeta(mp4.BoxType{'a', 't', 'I', 'D'}, uint32(atID))
|
||||
if err != nil {
|
||||
return err
|
||||
err = addMeta(mp4.BoxType{'a', 't', 'I', 'D'}, uint32(atID))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
trkn := make([]byte, 8)
|
||||
|
Loading…
x
Reference in New Issue
Block a user