Tidied playlist song duration check

pull/42/head
Jake 2015-02-17 19:18:09 +00:00 committed by Jake
parent 6a954e04b1
commit 541f371239
1 changed files with 1 additions and 3 deletions

View File

@ -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)
}
}