fix DATE tag
This commit is contained in:
parent
18f2ac726b
commit
e521cfcb7c
6
main.go
6
main.go
@ -823,10 +823,6 @@ func writeMP4Tags(trackPath string, meta *structs.AutoGenerated, trackNum, track
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
releaseYear, err := strconv.ParseUint(meta.Data[0].Attributes.ReleaseDate[:4], 10, 32)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
t := &mp4tag.MP4Tags{
|
t := &mp4tag.MP4Tags{
|
||||||
Title: meta.Data[0].Relationships.Tracks.Data[index].Attributes.Name,
|
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,
|
Artist: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
||||||
ArtistSort: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
ArtistSort: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
||||||
Custom: map[string]string{
|
Custom: map[string]string{
|
||||||
|
"DATE": meta.Data[0].Attributes.ReleaseDate,
|
||||||
"PERFORMER": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
"PERFORMER": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
||||||
"RELEASETIME": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ReleaseDate,
|
"RELEASETIME": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ReleaseDate,
|
||||||
"ISRC": meta.Data[0].Relationships.Tracks.Data[index].Attributes.Isrc,
|
"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,
|
Copyright: meta.Data[0].Attributes.Copyright,
|
||||||
Publisher: meta.Data[0].Attributes.RecordLabel,
|
Publisher: meta.Data[0].Attributes.RecordLabel,
|
||||||
ItunesArtistID: int32(artistID),
|
ItunesArtistID: int32(artistID),
|
||||||
Year: int32(releaseYear),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Contains(meta.Data[0].ID, "pl.") && !Config.UseSongInfoForPlaylist {
|
if strings.Contains(meta.Data[0].ID, "pl.") && !Config.UseSongInfoForPlaylist {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user