1
0

Added check if mostListened set.

This commit is contained in:
Alexander Andreev 2023-10-02 02:07:08 +04:00
parent 7cc228968d
commit ddf5f3d0f7
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -51,6 +51,9 @@ func CheckAndUpdateMostListenedSong(cur, prev *Song) {
// MostListened returns song that currently is the song with most simultaneous // MostListened returns song that currently is the song with most simultaneous
// listeners. // listeners.
func MostListened() *MostListenedSong { func MostListened() *MostListenedSong {
if mostListened.Date.Year() == 1 {
return nil
}
return &mostListened return &mostListened
} }