From e082527edc6c3382614499358bbc6c18cf29d0a3 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 21 Aug 2023 18:31:06 +0400 Subject: [PATCH] In case of an http error show Offline in a Now playing field. --- internal/radio/icecast.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/radio/icecast.go b/internal/radio/icecast.go index e364c5e..208e302 100644 --- a/internal/radio/icecast.go +++ b/internal/radio/icecast.go @@ -60,7 +60,7 @@ type Song struct { func IcecastGetStatus(icecastURL string) (*IcecastStatus, error) { resp, err := http.Get(icecastURL) if err != nil { - return &IcecastStatus{}, err + return &IcecastStatus{SongName: "Offline"}, err } iceStatDTO := &IcecastStatusDTO{}