Fixed playlists ignoring the max song length check
This commit is contained in:
parent
d37995b136
commit
eec8d9c3d2
|
@ -75,7 +75,12 @@ func NewPlaylist(user, id string) (*Playlist, error) {
|
|||
playlist: playlist,
|
||||
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 {
|
||||
dj.queue.AddSong(newSong)
|
||||
}
|
||||
}
|
||||
|
||||
return playlist, nil
|
||||
|
|
Reference in a new issue