add contentRating for meta

This commit is contained in:
zhaarey
2024-06-06 16:35:07 +08:00
parent 0979ae0e23
commit 63290b67b7
3 changed files with 22 additions and 0 deletions

View File

@@ -1387,6 +1387,13 @@ func rip(albumId string, token string, storefront string, userToken string) erro
tags := []string{
fmt.Sprintf("lyrics=%s", lrc),
}
if track.Attributes.ContentRating=="explicit"{
tags = append(tags, "rating=1")
}else if track.Attributes.ContentRating=="clean"{
tags = append(tags, "rating=2")
}else{
tags = append(tags, "rating=0")
}
if config.EmbedCover {
if strings.Contains(albumId, "pl.") && config.DlAlbumcoverForPlaylist {
err = writeCover(sanAlbumFolder,track.ID, track.Attributes.Artwork.URL)