fix DATE tag

This commit is contained in:
zhaarey 2025-01-13 14:10:31 +08:00
parent 18f2ac726b
commit e521cfcb7c

View File

@ -823,10 +823,6 @@ func writeMP4Tags(trackPath string, meta *structs.AutoGenerated, trackNum, track
if err != nil {
return err
}
releaseYear, err := strconv.ParseUint(meta.Data[0].Attributes.ReleaseDate[:4], 10, 32)
if err != nil {
return err
}
t := &mp4tag.MP4Tags{
Title: meta.Data[0].Relationships.Tracks.Data[index].Attributes.Name,
@ -836,6 +832,7 @@ func writeMP4Tags(trackPath string, meta *structs.AutoGenerated, trackNum, track
Artist: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
ArtistSort: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
Custom: map[string]string{
"DATE": meta.Data[0].Attributes.ReleaseDate,
"PERFORMER": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
"RELEASETIME": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ReleaseDate,
"ISRC": meta.Data[0].Relationships.Tracks.Data[index].Attributes.Isrc,
@ -850,7 +847,6 @@ func writeMP4Tags(trackPath string, meta *structs.AutoGenerated, trackNum, track
Copyright: meta.Data[0].Attributes.Copyright,
Publisher: meta.Data[0].Attributes.RecordLabel,
ItunesArtistID: int32(artistID),
Year: int32(releaseYear),
}
if strings.Contains(meta.Data[0].ID, "pl.") && !Config.UseSongInfoForPlaylist {