From 541f371239ff696a0160aa74d5730bcae12e301c Mon Sep 17 00:00:00 2001 From: Jake Date: Tue, 17 Feb 2015 19:18:09 +0000 Subject: [PATCH] Tidied playlist song duration check --- playlist.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/playlist.go b/playlist.go index 33ea4e8..aec48eb 100644 --- a/playlist.go +++ b/playlist.go @@ -76,9 +76,7 @@ func NewPlaylist(user, id string) (*Playlist, error) { dontSkip: false, } // Don't spam the chat if a playlist contains songs that are too long - if dj.conf.General.MaxSongDuration == 0 { - dj.queue.AddSong(newSong) - } else if duration <= dj.conf.General.MaxSongDuration { + if dj.conf.General.MaxSongDuration == 0 || duration <= dj.conf.General.MaxSongDuration { dj.queue.AddSong(newSong) } }