Tidied playlist song duration check
This commit is contained in:
parent
6a954e04b1
commit
541f371239
|
@ -76,9 +76,7 @@ func NewPlaylist(user, id string) (*Playlist, error) {
|
||||||
dontSkip: false,
|
dontSkip: false,
|
||||||
}
|
}
|
||||||
// Don't spam the chat if a playlist contains songs that are too long
|
// Don't spam the chat if a playlist contains songs that are too long
|
||||||
if dj.conf.General.MaxSongDuration == 0 {
|
if dj.conf.General.MaxSongDuration == 0 || duration <= dj.conf.General.MaxSongDuration {
|
||||||
dj.queue.AddSong(newSong)
|
|
||||||
} else if duration <= dj.conf.General.MaxSongDuration {
|
|
||||||
dj.queue.AddSong(newSong)
|
dj.queue.AddSong(newSong)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue