From 3ed6e10256842c7fa0605bee6584befd7ab91430 Mon Sep 17 00:00:00 2001 From: HaMiLToN5 Date: Thu, 29 Jan 2015 10:33:02 -0500 Subject: [PATCH] Update playlist.go --- playlist.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playlist.go b/playlist.go index 98cccb7..8577ae3 100644 --- a/playlist.go +++ b/playlist.go @@ -32,7 +32,7 @@ type Playlist struct { // via the YouTube Gdata API. func NewPlaylist(user, id string) *Playlist { queue := NewSongQueue() - jsonUrl := fmt.Sprintf("http://gdata.youtube.com/feeds/api/playlists/%s?v=2&alt=jsonc&maxresults=25", id) + jsonUrl := fmt.Sprintf("http://gdata.youtube.com/feeds/api/playlists/%s?v=2&alt=jsonc", id) jsonString := "" if response, err := http.Get(jsonUrl); err == nil { @@ -49,8 +49,8 @@ func NewPlaylist(user, id string) *Playlist { playlistTitle, _ := jq.String("data", "title") playlistItems, _ := jq.Int("data", "totalItems") - if playlistItems > 25 { - playlistItems = 25 + if playlistItems > dj.conf.General.PlaylistMaxSongs { + playlistItems = dj.conf.General.PlaylistMaxSongs } for i := 0; i < playlistItems; i++ {