In CheckAndUpdateMostListenedSong() accept Song by value instead of a pointer.
This commit is contained in:
parent
c7f6b3072d
commit
9b14d7846b
@ -46,8 +46,8 @@ var mostListened MostListenedSong
|
||||
//
|
||||
// So it would be fairer to give these listeners back to a song they was
|
||||
// listening to.
|
||||
func CheckAndUpdateMostListenedSong(cur *Song) {
|
||||
if cur == nil || cur.Artist == "" {
|
||||
func CheckAndUpdateMostListenedSong(cur Song) {
|
||||
if cur.Artist == "" {
|
||||
return
|
||||
}
|
||||
if cur.MaxListeners > mostListened.Listeners {
|
||||
|
Loading…
Reference in New Issue
Block a user