Convert the duration seconds from float64 to int
This commit is contained in:
parent
b8a10924f8
commit
b829c794e6
|
@ -91,7 +91,7 @@ func FindServiceAndAdd(user *gumble.User, url string) error {
|
||||||
oldLength := dj.queue.Len()
|
oldLength := dj.queue.Len()
|
||||||
for _, song := range songArray {
|
for _, song := range songArray {
|
||||||
// Check song is not too long
|
// Check song is not too long
|
||||||
if dj.conf.General.MaxSongDuration == 0 || song.Duration().Seconds() <= dj.conf.General.MaxSongDuration {
|
if dj.conf.General.MaxSongDuration == 0 || int(song.Duration().Seconds()) <= dj.conf.General.MaxSongDuration {
|
||||||
if !isNil(song.Playlist()) {
|
if !isNil(song.Playlist()) {
|
||||||
title = song.Playlist().Title()
|
title = song.Playlist().Title()
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue