fixed few song not have artistid
This commit is contained in:
parent
e521cfcb7c
commit
42c0aa0e5a
13
main.go
13
main.go
@ -815,10 +815,6 @@ func rip(albumId string, token string, storefront string, userToken string) erro
|
||||
|
||||
func writeMP4Tags(trackPath string, meta *structs.AutoGenerated, trackNum, trackTotal int) error {
|
||||
index := trackNum - 1
|
||||
artistID, err := strconv.ParseUint(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID, 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
albumID, err := strconv.ParseUint(meta.Data[0].ID, 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -846,7 +842,14 @@ func writeMP4Tags(trackPath string, meta *structs.AutoGenerated, trackNum, track
|
||||
CustomGenre: meta.Data[0].Relationships.Tracks.Data[index].Attributes.GenreNames[0],
|
||||
Copyright: meta.Data[0].Attributes.Copyright,
|
||||
Publisher: meta.Data[0].Attributes.RecordLabel,
|
||||
ItunesArtistID: int32(artistID),
|
||||
}
|
||||
|
||||
if len(meta.Data[0].Relationships.Artists.Data) > 0 {
|
||||
artistID, err := strconv.ParseUint(meta.Data[0].Relationships.Tracks.Data[index].Relationships.Artists.Data[0].ID, 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
t.ItunesArtistID = int32(artistID)
|
||||
}
|
||||
|
||||
if strings.Contains(meta.Data[0].ID, "pl.") && !Config.UseSongInfoForPlaylist {
|
||||
|
Loading…
x
Reference in New Issue
Block a user