Fixing build issues

This commit is contained in:
MichaelOultram 2015-07-28 13:00:04 +01:00
parent fe7b78d9c7
commit b4867c629d

View file

@ -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=2&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 > 2 {
numVideos = 2
}
for i := 0; i < numVideos; i++ {