From ddf5f3d0f77fd765302aac34e3545459836bd1d7 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 2 Oct 2023 02:07:08 +0400 Subject: [PATCH] Added check if mostListened set. --- internal/radio/mostlistened.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/radio/mostlistened.go b/internal/radio/mostlistened.go index 7d5a8ee..f38395c 100644 --- a/internal/radio/mostlistened.go +++ b/internal/radio/mostlistened.go @@ -51,6 +51,9 @@ func CheckAndUpdateMostListenedSong(cur, prev *Song) { // MostListened returns song that currently is the song with most simultaneous // listeners. func MostListened() *MostListenedSong { + if mostListened.Date.Year() == 1 { + return nil + } return &mostListened }