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{}
|
artistID := &specid.ID{}
|
||||||
if artist.ID != 0 {
|
if artist.ID != 0 {
|
||||||
|
// we don't always have a match if `inclNotPresent`
|
||||||
artistID = artist.SID()
|
artistID = artist.SID()
|
||||||
}
|
}
|
||||||
sub.ArtistInfoTwo.SimilarArtist = append(sub.ArtistInfoTwo.SimilarArtist, &spec.SimilarArtist{
|
sub.ArtistInfoTwo.SimilarArtist = append(sub.ArtistInfoTwo.SimilarArtist, &spec.SimilarArtist{
|
||||||
ID: artistID,
|
ID: artistID,
|
||||||
Name: similarInfo.Name,
|
Name: similarInfo.Name,
|
||||||
|
CoverArt: artistID,
|
||||||
AlbumCount: artist.AlbumCount,
|
AlbumCount: artist.AlbumCount,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -287,6 +287,7 @@ type Playlist struct {
|
|||||||
type SimilarArtist struct {
|
type SimilarArtist struct {
|
||||||
ID *specid.ID `xml:"id,attr" json:"id"`
|
ID *specid.ID `xml:"id,attr" json:"id"`
|
||||||
Name string `xml:"name,attr" json:"name"`
|
Name string `xml:"name,attr" json:"name"`
|
||||||
|
CoverArt *specid.ID `xml:"coverArt,attr" json:"coverArt"`
|
||||||
AlbumCount int `xml:"albumCount,attr,omitempty" json:"albumCount,omitempty"`
|
AlbumCount int `xml:"albumCount,attr,omitempty" json:"albumCount,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user