mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-19 15:23:36 +00:00
Get Similar Artists in parallel
Also don't fail `GetArtistInfo` when Last.FM is not configured
This commit is contained in:
1 parent
ed84c5a0a3
commit
1cd2f015c2
3 files changed
+25
-26
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user