From 8a91f197cf2d596629c20f255095da314888b65a Mon Sep 17 00:00:00 2001 From: GS <61323211+gsol10@users.noreply.github.com> Date: Mon, 21 Dec 2020 19:45:49 +0100 Subject: [PATCH] Add year to ChildTracks of an Album --- server/ctrlsubsonic/spec/construct_by_tags.go | 1 + server/ctrlsubsonic/spec/spec.go | 1 + 2 files changed, 2 insertions(+) diff --git a/server/ctrlsubsonic/spec/construct_by_tags.go b/server/ctrlsubsonic/spec/construct_by_tags.go index 04b6e8d..179acc1 100644 --- a/server/ctrlsubsonic/spec/construct_by_tags.go +++ b/server/ctrlsubsonic/spec/construct_by_tags.go @@ -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() diff --git a/server/ctrlsubsonic/spec/spec.go b/server/ctrlsubsonic/spec/spec.go index 1994a06..1263cd1 100644 --- a/server/ctrlsubsonic/spec/spec.go +++ b/server/ctrlsubsonic/spec/spec.go @@ -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 {