mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-04 17:28:39 +01:00
Get Similar Artists in parallel
Also don't fail `GetArtistInfo` when Last.FM is not configured
This commit is contained in:
parent
ed84c5a0a3
commit
1cd2f015c2
3 changed files with 25 additions and 26 deletions
|
|
@ -241,12 +241,7 @@ func (c *BrowsingController) GetArtistInfo(w http.ResponseWriter, r *http.Reques
|
|||
count := utils.ParamInt(r, "count", 20)
|
||||
includeNotPresent := utils.ParamBool(r, "includeNotPresent", false)
|
||||
|
||||
info, err := c.ei.ArtistInfo(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
similar, err := c.ei.SimilarArtists(ctx, id, includeNotPresent, count)
|
||||
info, err := c.ei.ArtistInfo(ctx, id, count, includeNotPresent)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -259,7 +254,7 @@ func (c *BrowsingController) GetArtistInfo(w http.ResponseWriter, r *http.Reques
|
|||
response.ArtistInfo.LargeImageUrl = info.LargeImageUrl
|
||||
response.ArtistInfo.LastFmUrl = info.LastFMUrl
|
||||
response.ArtistInfo.MusicBrainzID = info.MBID
|
||||
for _, s := range similar {
|
||||
for _, s := range info.SimilarArtists {
|
||||
similar := responses.Artist{}
|
||||
similar.Id = s.ID
|
||||
similar.Name = s.Name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue