diff --git a/service.go b/service.go index 480634d..9272a95 100644 --- a/service.go +++ b/service.go @@ -89,14 +89,14 @@ func FindServiceAndAdd(user *gumble.User, url string) error { // Loop through all songs and add to the queue oldLength := dj.queue.Len() - for songToAdd := range songArray { + for _, song := range songArray { // Check song is not too long - time, _ := time.ParseDuration(songToAdd.Duration) + time, _ := time.ParseDuration(song.Duration) if dj.conf.General.MaxSongDuration == 0 || int(time.Seconds()) <= dj.conf.General.MaxSongDuration { - if !isNil(songToAdd.Playlist()) { - title = songToAdd.Playlist().Title() + if !isNil(song.Playlist()) { + title = song.Playlist().Title() } else { - title = songToAdd.Title() + title = song.Title() } // Add song to queue