From a0a38634936b0e8ff8f985bd0286db269301847c Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Tue, 28 May 2024 21:09:03 +0000 Subject: [PATCH] trying to fix linting issue --- server/ctrlsubsonic/handlers_by_tags.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/ctrlsubsonic/handlers_by_tags.go b/server/ctrlsubsonic/handlers_by_tags.go index 6f0691b5..9090a451 100644 --- a/server/ctrlsubsonic/handlers_by_tags.go +++ b/server/ctrlsubsonic/handlers_by_tags.go @@ -49,7 +49,7 @@ func (c *Controller) ServeGetArtists(r *http.Request) *spec.Response { // [a-z#] -> 27 indexMap := make(map[string]*spec.Index, 27) resp := make([]*spec.Index, 0, 27) - for _, artist := range artists { + for i, artist := range artists { key := lowerUDecOrHash(artist.IndexName()) if _, ok := indexMap[key]; !ok { indexMap[key] = &spec.Index{ @@ -59,9 +59,9 @@ func (c *Controller) ServeGetArtists(r *http.Request) *spec.Response { resp = append(resp, indexMap[key]) } if artist.ImageURL != "" { - artist.Info = &db.ArtistInfo{ImageURL: artist.ImageURL} + artists[i].Info = &db.ArtistInfo{ImageURL: artist.ImageURL} } - indexMap[key].Artists = append(indexMap[key].Artists, spec.NewArtistByTags(&artist.Artist)) + indexMap[key].Artists = append(indexMap[key].Artists, spec.NewArtistByTags(&artists[i].Artist)) } sub := spec.NewResponse() sub.Artists = &spec.Artists{