Add year to ChildTracks of an Album

This commit is contained in:
GS
2020-12-27 15:56:26 +00:00
committed by Senan Kelly
parent 794a2043e3
commit 8a91f197cf
2 changed files with 2 additions and 0 deletions
@@ -50,6 +50,7 @@ func NewTrackByTags(t *db.Track, album *db.Album) *TrackChild {
Duration: t.Length,
Bitrate: t.Bitrate,
Type: "music",
Year: album.TagYear,
}
if album.Cover != "" {
ret.CoverID = album.SID()
+1
View File
@@ -140,6 +140,7 @@ type TrackChild struct {
TrackNumber int `xml:"track,attr,omitempty" json:"track,omitempty"`
DiscNumber int `xml:"discNumber,attr,omitempty" json:"discNumber,omitempty"`
Type string `xml:"type,attr,omitempty" json:"type,omitempty"`
Year int `xml:"year,attr,omitempty" json:"year,omitempty"`
}
type Artists struct {