Add year to ChildTracks of an Album

This commit is contained in:
GS
2020-12-21 19:45:49 +01:00
committed by Senan Kelly
parent 794a2043e3
commit 8a91f197cf
2 changed files with 2 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ func NewTrackByTags(t *db.Track, album *db.Album) *TrackChild {
Duration: t.Length, Duration: t.Length,
Bitrate: t.Bitrate, Bitrate: t.Bitrate,
Type: "music", Type: "music",
Year: album.TagYear,
} }
if album.Cover != "" { if album.Cover != "" {
ret.CoverID = album.SID() ret.CoverID = album.SID()

View File

@@ -140,6 +140,7 @@ type TrackChild struct {
TrackNumber int `xml:"track,attr,omitempty" json:"track,omitempty"` TrackNumber int `xml:"track,attr,omitempty" json:"track,omitempty"`
DiscNumber int `xml:"discNumber,attr,omitempty" json:"discNumber,omitempty"` DiscNumber int `xml:"discNumber,attr,omitempty" json:"discNumber,omitempty"`
Type string `xml:"type,attr,omitempty" json:"type,omitempty"` Type string `xml:"type,attr,omitempty" json:"type,omitempty"`
Year int `xml:"year,attr,omitempty" json:"year,omitempty"`
} }
type Artists struct { type Artists struct {