From 71534ced07f4ff13d7e8983b730cd677c679dbef Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Fri, 24 Jul 2020 15:36:41 +0200 Subject: [PATCH] Empty getArtistInfo2 response if lastfm_api_key is not set DSub will error out in Artists views if browse by tags is enabled and getArtistInfo2 returns an error. --- server/ctrlsubsonic/handlers_by_tags.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/ctrlsubsonic/handlers_by_tags.go b/server/ctrlsubsonic/handlers_by_tags.go index 1ea62e7..8dfac2f 100644 --- a/server/ctrlsubsonic/handlers_by_tags.go +++ b/server/ctrlsubsonic/handlers_by_tags.go @@ -224,7 +224,9 @@ func (c *Controller) ServeGetArtistInfoTwo(r *http.Request) *spec.Response { } apiKey := c.DB.GetSetting("lastfm_api_key") if apiKey == "" { - return spec.NewError(0, "please ask your admin to set the last.fm api key") + sub := spec.NewResponse() + sub.ArtistInfoTwo = &spec.ArtistInfo{} + return sub } artist := &db.Artist{} err = c.DB.