From 1309f534288ac1bef97941ca3278329f7a55ca70 Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Tue, 28 Jul 2015 14:00:18 +0100 Subject: [PATCH] Increased to 50 song limit per playlist --- service_youtube.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service_youtube.go b/service_youtube.go index 644dea7..b951164 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -405,14 +405,14 @@ func NewYouTubePlaylist(user, id string) (*YouTubePlaylist, error) { } // Retrieve items in playlist - url = fmt.Sprintf("https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=25&playlistId=%s&key=%s", + url = fmt.Sprintf("https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&playlistId=%s&key=%s", id, os.Getenv("YOUTUBE_API_KEY")) if apiResponse, err = PerformGetRequest(url); err != nil { return nil, err } numVideos, _ := apiResponse.Int("pageInfo", "totalResults") - if numVideos > 25 { - numVideos = 25 + if numVideos > 50 { + numVideos = 50 } for i := 0; i < numVideos; i++ {