From c8f71b205bc70f7569fc671a5f8fcd3dbe404684 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 12 May 2024 03:56:44 +0400 Subject: [PATCH] For Song omit listeners and peak_listeners if they are zero. --- internal/radio/song.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/radio/song.go b/internal/radio/song.go index 45a02ce..4d3a03c 100644 --- a/internal/radio/song.go +++ b/internal/radio/song.go @@ -27,8 +27,8 @@ func (s *Song) MarshalJSON() ([]byte, error) { Artist string `json:"artist"` Title string `json:"title"` DurationMill int64 `json:"duration_msec,omitempty"` - Listeners int64 `json:"listeners"` - PeakListeners int64 `json:"peak_listeners"` + Listeners int64 `json:"listeners,omitempty"` + PeakListeners int64 `json:"peak_listeners,omitempty"` StartAt string `json:"start_at"` }{ Artist: s.Artist,