ctrlsubsonic: implement getGenres
This commit is contained in:
@@ -72,3 +72,11 @@ func NewArtistByTags(a *db.Artist) *Artist {
|
||||
AlbumCount: a.AlbumCount,
|
||||
}
|
||||
}
|
||||
|
||||
func NewGenre(g *db.Genre) *Genre {
|
||||
return &Genre{
|
||||
Name: g.Name,
|
||||
AlbumCount: g.AlbumCount,
|
||||
SongCount: g.TrackCount,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,8 +250,9 @@ type Genres struct {
|
||||
}
|
||||
|
||||
type Genre struct {
|
||||
SongCount string `xml:"songCount,attr"`
|
||||
AlbumCount string `xml:"albumCount,attr"`
|
||||
Name string `xml:",chardata",json:"value"`
|
||||
SongCount int `xml:"songCount,attr,omitempty" json:"songCount,omitempty"`
|
||||
AlbumCount int `xml:"albumCount,attr,omitempty" json:"albumCount,omitempty"`
|
||||
}
|
||||
|
||||
type PlayQueue struct {
|
||||
|
||||
Reference in New Issue
Block a user