From 8f05f33ab8a1534433a252c085cbd5586084dd09 Mon Sep 17 00:00:00 2001 From: archekb <47732882+archekb@users.noreply.github.com> Date: Wed, 2 Aug 2023 12:08:49 +0200 Subject: [PATCH] subsonic: make homepageURL parameter optional By the https://opensubsonic.netlify.app/docs/endpoints/createinternetradiostation/ the `homepageURL` is not requirement option --- server/ctrlsubsonic/handlers_internet_radio.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ctrlsubsonic/handlers_internet_radio.go b/server/ctrlsubsonic/handlers_internet_radio.go index 9804197d..f2fc21f1 100644 --- a/server/ctrlsubsonic/handlers_internet_radio.go +++ b/server/ctrlsubsonic/handlers_internet_radio.go @@ -44,7 +44,7 @@ func (c *Controller) ServeCreateInternetRadioStation(r *http.Request) *spec.Resp return spec.NewError(10, "no name provided: %v", err) } homepageURL, err := params.Get("homepageUrl") - if err == nil { + if err == nil && homepageURL != "" { if _, err := url.ParseRequestURI(homepageURL); err != nil { return spec.NewError(70, "bad homepage URL provided: %v", err) }