Adding song and album counts
This commit is contained in:
@@ -172,5 +172,6 @@ func (c *BaseAPIController) ToChild(entry engine.Entry) responses.Child {
|
||||
child.ArtistId = entry.ArtistId
|
||||
child.Type = entry.Type
|
||||
child.UserRating = entry.UserRating
|
||||
child.SongCount = entry.SongCount
|
||||
return child
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ func (c *BrowsingController) GetIndexes() {
|
||||
for j, a := range idx.Artists {
|
||||
res.Index[i].Artists[j].Id = a.ArtistId
|
||||
res.Index[i].Artists[j].Name = a.Artist
|
||||
res.Index[i].Artists[j].AlbumCount = a.AlbumCount
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,9 @@ type MusicFolders struct {
|
||||
}
|
||||
|
||||
type Artist struct {
|
||||
Id string `xml:"id,attr" json:"id"`
|
||||
Name string `xml:"name,attr" json:"name"`
|
||||
Id string `xml:"id,attr" json:"id"`
|
||||
Name string `xml:"name,attr" json:"name"`
|
||||
AlbumCount int `xml:"albumCount,attr,omitempty" json:"albumCount,omitempty"`
|
||||
/*
|
||||
<xs:attribute name="starred" type="xs:dateTime" use="optional"/> <!-- Added in 1.10.1 -->
|
||||
<xs:attribute name="userRating" type="sub:UserRating" use="optional"/> <!-- Added in 1.13.0 -->
|
||||
@@ -94,6 +95,7 @@ type Child struct {
|
||||
ArtistId string `xml:"artistId,attr,omitempty" json:"artistId,omitempty"`
|
||||
Type string `xml:"type,attr,omitempty" json:"type,omitempty"`
|
||||
UserRating int `xml:"userRating,attr,omitempty" json:"userRating,omitempty"`
|
||||
SongCount int `xml:"songCount,attr,omitempty" json:"songCount,omitempty"`
|
||||
/*
|
||||
<xs:attribute name="isVideo" type="xs:boolean" use="optional"/> <!-- Added in 1.4.1 -->
|
||||
<xs:attribute name="averageRating" type="sub:AverageRating" use="optional"/> <!-- Added in 1.6.0 -->
|
||||
|
||||
Reference in New Issue
Block a user