add artist-folder-format tag {ArtistName}/{ArtistsName}

pull/34/head
itouakirai 2 months ago committed by GitHub
parent 3caeaa66a4
commit d1c576847b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      main.go

@ -1408,15 +1408,18 @@ func rip(albumId string, token string, storefront string, userToken string) erro
singerFoldername = strings.NewReplacer(
"{ArtistName}", "Apple Music",
"{ArtistId}", "",
"{ArtistsName}", "Apple Music",
).Replace(config.ArtistFolderFormat)
} else if len(meta.Data[0].Relationships.Artists.Data) > 0 {
singerFoldername = strings.NewReplacer(
"{ArtistName}", LimitString(meta.Data[0].Attributes.ArtistName),
"{ArtistName}", LimitString(meta.Data[0].Relationships.Artists.Data[0].Attributes.Name),
"{ArtistsName}", LimitString(meta.Data[0].Attributes.ArtistName),
"{ArtistId}", meta.Data[0].Relationships.Artists.Data[0].ID,
).Replace(config.ArtistFolderFormat)
} else {
singerFoldername = strings.NewReplacer(
"{ArtistName}", LimitString(meta.Data[0].Attributes.ArtistName),
"{ArtistName}", LimitString(meta.Data[0].Relationships.Artists.Data[0].Attributes.Name),
"{ArtistsName}", LimitString(meta.Data[0].Attributes.ArtistName),
"{ArtistId}", "",
).Replace(config.ArtistFolderFormat)
}

Loading…
Cancel
Save