diff --git a/service_soundcloud.go b/service_soundcloud.go index 4fd85bb..bb2adb7 100644 --- a/service_soundcloud.go +++ b/service_soundcloud.go @@ -66,6 +66,9 @@ func (sc SoundCloud) NewRequest(user *gumble.User, url string) ([]Song, error) { title: title, } + if (dj.conf.General.MaxSongPerPlaylist > 0 && len(tracks) > dj.conf.General.MaxSongPerPlaylist){ + tracks = tracks[:dj.conf.General.MaxSongPerPlaylist] + } // Add all tracks for _, t := range tracks { if song, err := sc.NewSong(user, jsonq.NewQuery(t), 0, playlist); err == nil {