feat(subsonic): return artist cover ids for similar artists response
This commit is contained in:
@@ -367,11 +367,13 @@ func (c *Controller) ServeGetArtistInfoTwo(r *http.Request) *spec.Response {
|
||||
}
|
||||
artistID := &specid.ID{}
|
||||
if artist.ID != 0 {
|
||||
// we don't always have a match if `inclNotPresent`
|
||||
artistID = artist.SID()
|
||||
}
|
||||
sub.ArtistInfoTwo.SimilarArtist = append(sub.ArtistInfoTwo.SimilarArtist, &spec.SimilarArtist{
|
||||
ID: artistID,
|
||||
Name: similarInfo.Name,
|
||||
CoverArt: artistID,
|
||||
AlbumCount: artist.AlbumCount,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -287,6 +287,7 @@ type Playlist struct {
|
||||
type SimilarArtist struct {
|
||||
ID *specid.ID `xml:"id,attr" json:"id"`
|
||||
Name string `xml:"name,attr" json:"name"`
|
||||
CoverArt *specid.ID `xml:"coverArt,attr" json:"coverArt"`
|
||||
AlbumCount int `xml:"albumCount,attr,omitempty" json:"albumCount,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user