feat(subsonic): add year and genre fields to track-by-folder response

fixes #223
This commit is contained in:
sentriz
2022-05-18 22:01:47 +01:00
parent 668c334f45
commit 53a4247dfd
3 changed files with 49 additions and 23 deletions

View File

@@ -2,6 +2,7 @@ package spec
import (
"path"
"strings"
"go.senan.xyz/gonic/db"
)
@@ -54,6 +55,8 @@ func NewTCTrackByFolder(t *db.Track, parent *db.Album) *TrackChild {
),
ParentID: parent.SID(),
Duration: t.Length,
Genre: strings.Join(t.GenreStrings(), ", "),
Year: parent.TagYear,
Bitrate: t.Bitrate,
IsDir: false,
Type: "music",