@@ -51,6 +51,9 @@ func NewAlbumByTags(a *db.Album, artists []*db.Artist) *Album {
|
||||
for _, g := range a.Genres {
|
||||
ret.Genres = append(ret.Genres, &GenreRef{Name: g.Name})
|
||||
}
|
||||
if a.Play != nil {
|
||||
ret.PlayCount = a.Play.Count
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
|
||||
@@ -144,6 +144,7 @@ type Album struct {
|
||||
Name string `xml:"name,attr" json:"name"`
|
||||
TrackCount int `xml:"songCount,attr" json:"songCount"`
|
||||
Duration int `xml:"duration,attr" json:"duration"`
|
||||
PlayCount int `xml:"playCount,attr" json:"playCount"`
|
||||
Genre string `xml:"genre,attr,omitempty" json:"genre,omitempty"`
|
||||
Genres []*GenreRef `xml:"genres,omitempty" json:"genres,omitempty"`
|
||||
Year int `xml:"year,attr,omitempty" json:"year,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user