Fixed playlists ignoring the max song length check

This commit is contained in:
Jake 2015-02-17 18:51:55 +00:00 committed by Jake
parent d37995b136
commit eec8d9c3d2

View file

@ -75,7 +75,12 @@ func NewPlaylist(user, id string) (*Playlist, error) {
playlist: playlist, playlist: playlist,
dontSkip: false, 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) dj.queue.AddSong(newSong)
} else if duration <= dj.conf.General.MaxSongDuration {
dj.queue.AddSong(newSong)
}
} }
return playlist, nil return playlist, nil