fix artistid
This commit is contained in:
parent
63290b67b7
commit
b55788e9fe
2
main.go
2
main.go
@ -818,6 +818,7 @@ 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 {
|
||||
@ -829,6 +830,7 @@ func writeM4a(w *mp4.Writer, info *SongInfo, meta *AutoGenerated, data []byte, t
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
trkn := make([]byte, 8)
|
||||
disk := make([]byte, 8)
|
||||
binary.BigEndian.PutUint32(trkn, uint32(meta.Data[0].Relationships.Tracks.Data[index].Attributes.TrackNumber))
|
||||
|
@ -812,7 +812,7 @@ 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 {
|
||||
@ -824,6 +824,7 @@ func writeM4a(w *mp4.Writer, info *SongInfo, meta *AutoGenerated, data []byte, t
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
trkn := make([]byte, 8)
|
||||
disk := make([]byte, 8)
|
||||
binary.BigEndian.PutUint32(trkn, uint32(meta.Data[0].Relationships.Tracks.Data[index].Attributes.TrackNumber))
|
||||
|
Loading…
x
Reference in New Issue
Block a user