Skip to content

Commit

Permalink
feat(subsonic): return artist cover ids for similar artists response
Browse files Browse the repository at this point in the history
  • Loading branch information
sentriz committed Sep 13, 2023
1 parent 3553348 commit c15349f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/ctrlsubsonic/handlers_by_tags.go
Expand Up @@ -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,
})
}
Expand Down
1 change: 1 addition & 0 deletions server/ctrlsubsonic/spec/spec.go
Expand Up @@ -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"`
}

Expand Down

0 comments on commit c15349f

Please sign in to comment.