Skip to content

Commit

Permalink
print artist name instead of object in lastfm tracks error
Browse files Browse the repository at this point in the history
  • Loading branch information
sentriz committed Nov 14, 2022
1 parent bf3c13b commit ba28302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/ctrlsubsonic/handlers_by_tags.go
Expand Up @@ -541,7 +541,7 @@ func (c *Controller) ServeGetTopSongs(r *http.Request) *spec.Response {
return spec.NewError(0, "fetching artist top tracks: %v", err)
}
if len(topTracks.Tracks) == 0 {
return spec.NewError(70, "no top tracks found for artist: %v", artist)
return spec.NewError(70, "no top tracks found for artist: %s", artist.Name)
}

topTrackNames := make([]string, len(topTracks.Tracks))
Expand All @@ -562,7 +562,7 @@ func (c *Controller) ServeGetTopSongs(r *http.Request) *spec.Response {
return spec.NewError(0, "error finding tracks: %v", err)
}
if len(tracks) == 0 {
return spec.NewError(70, "no tracks found matchind last fm top songs for artist: %v", artist)
return spec.NewError(70, "no tracks found matching last fm top songs for artist: %s", artist.Name)
}

sub := spec.NewResponse()
Expand Down

0 comments on commit ba28302

Please sign in to comment.